mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-18 04:43:06 +03:00
Tiny C Compiler:
- Temporarily unrecoverable errors with autoloading libraries. Rollback to working state: r8558 git-svn-id: svn://kolibrios.org@8678 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
b84cfc1204
commit
6317b7f33c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -5,7 +5,7 @@ include "__lib__.inc"
|
||||
fun equ http_free
|
||||
fun_str equ 'free'
|
||||
|
||||
section '.imp.@.'
|
||||
section '.text'
|
||||
|
||||
fun_name db fun_str, 0
|
||||
|
||||
|
@ -5,7 +5,7 @@ include "__lib__.inc"
|
||||
fun equ http_get
|
||||
fun_str equ 'get'
|
||||
|
||||
section '.imp.@.'
|
||||
section '.text'
|
||||
|
||||
fun_name db fun_str, 0
|
||||
|
||||
|
@ -5,7 +5,7 @@ include "__lib__.inc"
|
||||
fun equ http_head
|
||||
fun_str equ 'head'
|
||||
|
||||
section '.imp.@.'
|
||||
section '.text'
|
||||
|
||||
fun_name db fun_str, 0
|
||||
|
||||
|
@ -5,7 +5,7 @@ include "__lib__.inc"
|
||||
fun equ http_post
|
||||
fun_str equ 'post'
|
||||
|
||||
section '.imp.@.'
|
||||
section '.text'
|
||||
|
||||
fun_name db fun_str, 0
|
||||
|
||||
|
@ -5,7 +5,7 @@ include "__lib__.inc"
|
||||
fun equ http_receive
|
||||
fun_str equ 'receive'
|
||||
|
||||
section '.imp.@.'
|
||||
section '.text'
|
||||
|
||||
fun_name db fun_str, 0
|
||||
|
||||
|
@ -5,7 +5,7 @@ include "__lib__.inc"
|
||||
fun equ http_send
|
||||
fun_str equ 'send'
|
||||
|
||||
section '.imp.@.'
|
||||
section '.text'
|
||||
|
||||
fun_name db fun_str, 0
|
||||
|
||||
|
@ -5,7 +5,7 @@ include "__lib__.inc"
|
||||
fun equ InputBox
|
||||
fun_str equ 'InputBox'
|
||||
|
||||
section '.imp.@.'
|
||||
section '.text'
|
||||
|
||||
fun_name db fun_str, 0
|
||||
|
||||
|
@ -5,7 +5,7 @@ include "__lib__.inc"
|
||||
fun equ charsFit
|
||||
fun_str equ 'charsFit'
|
||||
|
||||
section '.imp.@.'
|
||||
section '.text'
|
||||
|
||||
fun_name db fun_str, 0
|
||||
|
||||
|
@ -5,7 +5,7 @@ include "__lib__.inc"
|
||||
fun equ countUTF8Z
|
||||
fun_str equ 'cntUTF-8'
|
||||
|
||||
section '.imp.@.'
|
||||
section '.text'
|
||||
|
||||
fun_name db fun_str, 0
|
||||
|
||||
|
@ -5,7 +5,7 @@ include "__lib__.inc"
|
||||
fun equ drawText
|
||||
fun_str equ 'drawText'
|
||||
|
||||
section '.imp.@.'
|
||||
section '.text'
|
||||
|
||||
fun_name db fun_str, 0
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
fasm __lib__.asm
|
||||
fasm charsFit.asm
|
||||
fasm cntUTF-8.asm
|
||||
fasm drawText.asm
|
||||
fasm strWidth.asm
|
||||
kos32-ar -ru librasterworks.a *.o
|
||||
fasm mb_create.asm
|
||||
fasm mb_reinit.asm
|
||||
fasm mb_setfunctions.asm
|
||||
kos32-ar -ru libmsgbox.a *.o
|
||||
del *.o
|
||||
pause
|
||||
|
@ -5,7 +5,7 @@ include "__lib__.inc"
|
||||
fun equ strWidth
|
||||
fun_str equ 'strWidth'
|
||||
|
||||
section '.imp.@.'
|
||||
section '.text'
|
||||
|
||||
fun_name db fun_str, 0
|
||||
|
||||
|
@ -5,7 +5,7 @@ include "__lib__.inc"
|
||||
fun equ msgbox_create
|
||||
fun_str equ 'mb_create'
|
||||
|
||||
section '.imp.@.'
|
||||
section '.text'
|
||||
|
||||
fun_name db fun_str, 0
|
||||
|
||||
|
@ -5,7 +5,7 @@ include "__lib__.inc"
|
||||
fun equ msgbox_reinit
|
||||
fun_str equ 'mb_reinit'
|
||||
|
||||
section '.imp.@.'
|
||||
section '.text'
|
||||
|
||||
fun_name db fun_str, 0
|
||||
|
||||
|
@ -5,7 +5,7 @@ include "__lib__.inc"
|
||||
fun equ msgbox_setfunctions
|
||||
fun_str equ 'mb_setfunctions'
|
||||
|
||||
section '.imp.@.'
|
||||
section '.text'
|
||||
|
||||
fun_name db fun_str, 0
|
||||
|
||||
|
@ -5,7 +5,7 @@ include "__lib__.inc"
|
||||
fun equ sample_symbol
|
||||
fun_str equ 'sample_symbol'
|
||||
|
||||
section '.imp.@.'
|
||||
section '.text'
|
||||
|
||||
fun_name db fun_str, 0
|
||||
|
||||
|
@ -41,7 +41,6 @@ typedef struct {
|
||||
meos_section_info* code_sections;
|
||||
meos_section_info* data_sections;
|
||||
meos_section_info* bss_sections;
|
||||
meos_section_info* imp_sections; // Pointers to imported libraries and functions
|
||||
} me_info;
|
||||
|
||||
int tcc_output_dbgme(const char *filename, me_info* me);
|
||||
@ -65,11 +64,6 @@ meos_section_info* findsection(me_info* me,int num)
|
||||
if (si->sec_num==num)
|
||||
return si;
|
||||
}
|
||||
for (si=me->imp_sections;si;si=si->next)
|
||||
{
|
||||
if (si->sec_num==num)
|
||||
return si;
|
||||
}
|
||||
return (meos_section_info*)0;
|
||||
}
|
||||
|
||||
@ -168,16 +162,6 @@ void assign_addresses(me_info* me)
|
||||
me->bss_sections=si;
|
||||
continue;
|
||||
}
|
||||
if (strcmp(".imp.@.",s->name)==0)
|
||||
{
|
||||
si=tcc_malloc(sizeof(meos_section_info));
|
||||
si->data=s->data;
|
||||
si->data_size=s->data_offset;
|
||||
si->next=me->imp_sections;
|
||||
si->sec_num=i;
|
||||
me->imp_sections=si;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
int addr;
|
||||
addr=sizeof(IMAGE_MEOS_FILE_HEADER);
|
||||
@ -191,11 +175,6 @@ void assign_addresses(me_info* me)
|
||||
si->sh_addr=addr;
|
||||
addr+=si->data_size;
|
||||
}
|
||||
for (si=me->imp_sections;si;si=si->next)
|
||||
{
|
||||
si->sh_addr=addr;
|
||||
addr+=si->data_size;
|
||||
}
|
||||
me->header.image_size=addr;
|
||||
for (si=me->bss_sections;si;si=si->next)
|
||||
{
|
||||
@ -290,13 +269,6 @@ int tcc_output_me(TCCState* s1,const char *filename)
|
||||
fwrite(si->data,1,si->data_size,f);
|
||||
for (si=me.data_sections;si;si=si->next)
|
||||
fwrite(si->data,1,si->data_size,f);
|
||||
// IMPORTANT: Write ".imp.@." sections at the very end!
|
||||
// BSS sections don't count, they should not be in the file at all
|
||||
// Cause MENUET header filled assuming that file size does not include BSS
|
||||
// We just emit it for smaller entrophia, sometimes
|
||||
// it makes the kex file being packed better
|
||||
for (si=me.imp_sections;si;si=si->next)
|
||||
fwrite(si->data,1,si->data_size,f);
|
||||
if (!s1->nobss)
|
||||
{
|
||||
for (si=me.bss_sections;si;si=si->next)
|
||||
@ -327,6 +299,7 @@ static inline int get_current_folder(char* buf, int bufsize){
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
char *getcwd(char *buf, size_t size)
|
||||
{
|
||||
int rc = get_current_folder(buf, size);
|
||||
|
Loading…
Reference in New Issue
Block a user