With -run -nostdlib use "_start" as the entry symbol.

mob
Ziga Lenarcic 2019-04-07 13:44:07 +02:00
parent 2a417b50ee
commit fa0ef91a24
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ LIBTCCAPI int tcc_run(TCCState *s1, int argc, char **argv)
{
int (*prog_main)(int, char **);
s1->runtime_main = "main";
s1->runtime_main = s1->nostdlib ? "_start" : "main";
if ((s1->dflag & 16) && !find_elf_sym(s1->symtab, s1->runtime_main))
return 0;
if (tcc_relocate(s1, TCC_RELOCATE_AUTO) < 0)