🆕 libc新增_start函数,实现main的返回值的捕获

This commit is contained in:
fslongjin
2022-06-25 00:51:29 +08:00
parent 325bc981fe
commit d7d449bddd
5 changed files with 31 additions and 4 deletions

View File

@ -25,7 +25,8 @@ int main()
// printf("Hello World!\n");
print_ascii_logo();
print_copyright();
exit(0);
while (1)
;
// exit(0);
// while (1)
// ;
return 0;
}

View File

@ -1,7 +1,7 @@
OUTPUT_FORMAT("elf64-x86-64","elf64-x86-64","elf64-x86-64")
OUTPUT_ARCH(i386:x86-64)
ENTRY(main)
ENTRY(_start)
SECTIONS
{