From c5f03d0dac0a59fecef265451837d9f4bc091cd0 Mon Sep 17 00:00:00 2001 From: turbocat Date: Wed, 12 Jan 2022 17:45:45 +0000 Subject: [PATCH] ktcc: - Fixed autolink bug; - Mixed up members of IMAGE_MEOS_FILE_HEADER structure fixed. git-svn-id: svn://kolibrios.org@9619 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/ktcc/trunk/source/tccmeos.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/develop/ktcc/trunk/source/tccmeos.c b/programs/develop/ktcc/trunk/source/tccmeos.c index 01a9a9b19c..d96d4814ba 100644 --- a/programs/develop/ktcc/trunk/source/tccmeos.c +++ b/programs/develop/ktcc/trunk/source/tccmeos.c @@ -28,8 +28,8 @@ typedef struct { int image_size; int memory_size; int stack; - int params; int argv; + int path; } IMAGE_MEOS_FILE_HEADER,*PIMAGE_MEOS_FILE_HEADER; typedef struct _meos_section_info{ int sh_addr; @@ -293,10 +293,10 @@ int tcc_output_me(TCCState* s1,const char *filename) //printf("%d\n",s1->nb_sections); memset(&me,0,sizeof(me)); me.s1=s1; + tcc_add_runtime(s1); #ifdef TCC_TARGET_KX kx_init(&me); #endif - tcc_add_runtime(s1); relocate_common_syms(); assign_addresses(&me); @@ -304,8 +304,8 @@ int tcc_output_me(TCCState* s1,const char *filename) tcc_output_dbgme(filename, &me); if (!tcc_find_symbol_me(&me, "start", &me.header.entry_point) | - !tcc_find_symbol_me(&me, "__argv", &me.header.params) | - !tcc_find_symbol_me(&me, "__path", &me.header.argv)) { + !tcc_find_symbol_me(&me, "__argv", &me.header.argv) | + !tcc_find_symbol_me(&me, "__path", &me.header.path)) { exit(1); }