mirror of
https://github.com/TinyCC/tinycc.git
synced 2025-11-16 12:34:45 +00:00
fixed libc linking when running in memory
This commit is contained in:
7
tccelf.c
7
tccelf.c
@@ -849,9 +849,12 @@ static void tcc_add_runtime(TCCState *s1)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* add libc if not memory output */
|
/* add libc */
|
||||||
if (s1->output_type != TCC_OUTPUT_MEMORY && !s1->nostdlib) {
|
if (!s1->nostdlib) {
|
||||||
tcc_add_library(s1, "c");
|
tcc_add_library(s1, "c");
|
||||||
|
}
|
||||||
|
/* add crt end if not memory output */
|
||||||
|
if (s1->output_type != TCC_OUTPUT_MEMORY && !s1->nostdlib) {
|
||||||
tcc_add_file(s1, CONFIG_TCC_CRT_PREFIX "/crtn.o");
|
tcc_add_file(s1, CONFIG_TCC_CRT_PREFIX "/crtn.o");
|
||||||
}
|
}
|
||||||
/* add various standard linker symbols */
|
/* add various standard linker symbols */
|
||||||
|
|||||||
Reference in New Issue
Block a user