mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-26 03:50:07 +08:00
when tcc1 omit: use main() directly
This commit is contained in:
parent
7eebf614dc
commit
a3578379fb
8
tccpe.c
8
tccpe.c
@ -1881,8 +1881,14 @@ static void pe_add_runtime(TCCState *s1, struct pe_info *pe)
|
||||
pe_type = PE_EXE;
|
||||
if (find_elf_sym(symtab_section, "wmain"))
|
||||
unicode_entry = PE_EXE;
|
||||
else
|
||||
/* use main() directly when TCC1 is "" */
|
||||
if (strlen(TCC_LIBTCC1)==0){
|
||||
start_symbol = "_main";
|
||||
}
|
||||
}
|
||||
|
||||
if(!start_symbol)
|
||||
start_symbol =
|
||||
TCC_OUTPUT_MEMORY == s1->output_type
|
||||
? PE_GUI == pe_type ? (unicode_entry ? "__runwwinmain" : "__runwinmain")
|
||||
@ -2047,3 +2053,5 @@ ST_FUNC int pe_output_file(TCCState *s1, const char *filename)
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
/* vim: set expandtab ts=4 sw=4 sts=4 tw=80 :*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user