diff --git a/programs/develop/ktcc/trunk/bin/kos32-tcc b/programs/develop/ktcc/trunk/bin/kos32-tcc index 627cc6bb2a..2ef1dbc48b 100755 Binary files a/programs/develop/ktcc/trunk/bin/kos32-tcc and b/programs/develop/ktcc/trunk/bin/kos32-tcc differ diff --git a/programs/develop/ktcc/trunk/bin/lib/libhttp.a b/programs/develop/ktcc/trunk/bin/lib/libhttp.a index a94b12bf83..80fdce442a 100644 Binary files a/programs/develop/ktcc/trunk/bin/lib/libhttp.a and b/programs/develop/ktcc/trunk/bin/lib/libhttp.a differ diff --git a/programs/develop/ktcc/trunk/bin/lib/libinputbox.a b/programs/develop/ktcc/trunk/bin/lib/libinputbox.a index de05163bc6..59de846216 100644 Binary files a/programs/develop/ktcc/trunk/bin/lib/libinputbox.a and b/programs/develop/ktcc/trunk/bin/lib/libinputbox.a differ diff --git a/programs/develop/ktcc/trunk/bin/lib/libmsgbox.a b/programs/develop/ktcc/trunk/bin/lib/libmsgbox.a index 848b833f00..a23e582777 100644 Binary files a/programs/develop/ktcc/trunk/bin/lib/libmsgbox.a and b/programs/develop/ktcc/trunk/bin/lib/libmsgbox.a differ diff --git a/programs/develop/ktcc/trunk/bin/lib/librasterworks.a b/programs/develop/ktcc/trunk/bin/lib/librasterworks.a index a4ed10417d..c7bc4b96c2 100644 Binary files a/programs/develop/ktcc/trunk/bin/lib/librasterworks.a and b/programs/develop/ktcc/trunk/bin/lib/librasterworks.a differ diff --git a/programs/develop/ktcc/trunk/bin/tcc b/programs/develop/ktcc/trunk/bin/tcc index 9ce363b42f..1c7e416f6c 100644 Binary files a/programs/develop/ktcc/trunk/bin/tcc and b/programs/develop/ktcc/trunk/bin/tcc differ diff --git a/programs/develop/ktcc/trunk/lib/http/free.asm b/programs/develop/ktcc/trunk/lib/http/free.asm index e88d32bb34..77e7ee108e 100644 --- a/programs/develop/ktcc/trunk/lib/http/free.asm +++ b/programs/develop/ktcc/trunk/lib/http/free.asm @@ -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 diff --git a/programs/develop/ktcc/trunk/lib/http/get.asm b/programs/develop/ktcc/trunk/lib/http/get.asm index 8f3a73265f..d2a1132553 100644 --- a/programs/develop/ktcc/trunk/lib/http/get.asm +++ b/programs/develop/ktcc/trunk/lib/http/get.asm @@ -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 diff --git a/programs/develop/ktcc/trunk/lib/http/head.asm b/programs/develop/ktcc/trunk/lib/http/head.asm index 2adeb2bae2..5b7ac8b942 100644 --- a/programs/develop/ktcc/trunk/lib/http/head.asm +++ b/programs/develop/ktcc/trunk/lib/http/head.asm @@ -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 diff --git a/programs/develop/ktcc/trunk/lib/http/post.asm b/programs/develop/ktcc/trunk/lib/http/post.asm index 39c6c6cc6e..cedf139378 100644 --- a/programs/develop/ktcc/trunk/lib/http/post.asm +++ b/programs/develop/ktcc/trunk/lib/http/post.asm @@ -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 diff --git a/programs/develop/ktcc/trunk/lib/http/receive.asm b/programs/develop/ktcc/trunk/lib/http/receive.asm index bb77c74d27..5bc616828c 100644 --- a/programs/develop/ktcc/trunk/lib/http/receive.asm +++ b/programs/develop/ktcc/trunk/lib/http/receive.asm @@ -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 diff --git a/programs/develop/ktcc/trunk/lib/http/send.asm b/programs/develop/ktcc/trunk/lib/http/send.asm index 31b1d134af..3adfe2bb80 100644 --- a/programs/develop/ktcc/trunk/lib/http/send.asm +++ b/programs/develop/ktcc/trunk/lib/http/send.asm @@ -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 diff --git a/programs/develop/ktcc/trunk/lib/inputbox/InputBox.asm b/programs/develop/ktcc/trunk/lib/inputbox/InputBox.asm index b3b5e84696..deebcffe29 100644 --- a/programs/develop/ktcc/trunk/lib/inputbox/InputBox.asm +++ b/programs/develop/ktcc/trunk/lib/inputbox/InputBox.asm @@ -5,7 +5,7 @@ include "__lib__.inc" fun equ InputBox fun_str equ 'InputBox' -section '.imp.@.' +section '.text' fun_name db fun_str, 0 diff --git a/programs/develop/ktcc/trunk/lib/librasterworks/charsFit.asm b/programs/develop/ktcc/trunk/lib/librasterworks/charsFit.asm index 025797e033..97dc8a6a58 100644 --- a/programs/develop/ktcc/trunk/lib/librasterworks/charsFit.asm +++ b/programs/develop/ktcc/trunk/lib/librasterworks/charsFit.asm @@ -5,7 +5,7 @@ include "__lib__.inc" fun equ charsFit fun_str equ 'charsFit' -section '.imp.@.' +section '.text' fun_name db fun_str, 0 diff --git a/programs/develop/ktcc/trunk/lib/librasterworks/cntUTF-8.asm b/programs/develop/ktcc/trunk/lib/librasterworks/cntUTF-8.asm index 904cbe4b09..6720eac7c0 100644 --- a/programs/develop/ktcc/trunk/lib/librasterworks/cntUTF-8.asm +++ b/programs/develop/ktcc/trunk/lib/librasterworks/cntUTF-8.asm @@ -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 diff --git a/programs/develop/ktcc/trunk/lib/librasterworks/drawText.asm b/programs/develop/ktcc/trunk/lib/librasterworks/drawText.asm index 8038499dfc..9662bc0372 100644 --- a/programs/develop/ktcc/trunk/lib/librasterworks/drawText.asm +++ b/programs/develop/ktcc/trunk/lib/librasterworks/drawText.asm @@ -5,7 +5,7 @@ include "__lib__.inc" fun equ drawText fun_str equ 'drawText' -section '.imp.@.' +section '.text' fun_name db fun_str, 0 diff --git a/programs/develop/ktcc/trunk/lib/librasterworks/make.bat b/programs/develop/ktcc/trunk/lib/librasterworks/make.bat index d4c475a2cc..c70d398a69 100644 --- a/programs/develop/ktcc/trunk/lib/librasterworks/make.bat +++ b/programs/develop/ktcc/trunk/lib/librasterworks/make.bat @@ -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 diff --git a/programs/develop/ktcc/trunk/lib/librasterworks/strWidth.asm b/programs/develop/ktcc/trunk/lib/librasterworks/strWidth.asm index 5bf90b5168..81a3d7e553 100644 --- a/programs/develop/ktcc/trunk/lib/librasterworks/strWidth.asm +++ b/programs/develop/ktcc/trunk/lib/librasterworks/strWidth.asm @@ -5,7 +5,7 @@ include "__lib__.inc" fun equ strWidth fun_str equ 'strWidth' -section '.imp.@.' +section '.text' fun_name db fun_str, 0 diff --git a/programs/develop/ktcc/trunk/lib/msgbox/mb_create.asm b/programs/develop/ktcc/trunk/lib/msgbox/mb_create.asm index bb0c9959c2..a94f017c9b 100644 --- a/programs/develop/ktcc/trunk/lib/msgbox/mb_create.asm +++ b/programs/develop/ktcc/trunk/lib/msgbox/mb_create.asm @@ -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 diff --git a/programs/develop/ktcc/trunk/lib/msgbox/mb_reinit.asm b/programs/develop/ktcc/trunk/lib/msgbox/mb_reinit.asm index c54169708e..2cf8a0db27 100644 --- a/programs/develop/ktcc/trunk/lib/msgbox/mb_reinit.asm +++ b/programs/develop/ktcc/trunk/lib/msgbox/mb_reinit.asm @@ -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 diff --git a/programs/develop/ktcc/trunk/lib/msgbox/mb_setfunctions.asm b/programs/develop/ktcc/trunk/lib/msgbox/mb_setfunctions.asm index 90123f62f9..20ae112cbf 100644 --- a/programs/develop/ktcc/trunk/lib/msgbox/mb_setfunctions.asm +++ b/programs/develop/ktcc/trunk/lib/msgbox/mb_setfunctions.asm @@ -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 diff --git a/programs/develop/ktcc/trunk/lib/sample/sample_symbol.asm b/programs/develop/ktcc/trunk/lib/sample/sample_symbol.asm index 2c18ea752e..613ad69a91 100644 --- a/programs/develop/ktcc/trunk/lib/sample/sample_symbol.asm +++ b/programs/develop/ktcc/trunk/lib/sample/sample_symbol.asm @@ -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 diff --git a/programs/develop/ktcc/trunk/source/tccmeos.c b/programs/develop/ktcc/trunk/source/tccmeos.c index e32e29705d..c0756a7f07 100644 --- a/programs/develop/ktcc/trunk/source/tccmeos.c +++ b/programs/develop/ktcc/trunk/source/tccmeos.c @@ -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);