gcc version 14.2.0 (Rev1, Built by MSYS2 project)
//test.c
#include <stdio.h>
int main() {
getchar();
return0;}
gcc.exe -g -O0 -x c -fno-exceptions -fno-stack-protector -fno-ident test.c -o
test.exe
I used IDA pro to reverse engineer test.exe and found that gcc added "call
__main" to the front of the assembly code, and then executed "jmp
__do_global_ctors". I guess this code means to instantiate C++ objects.
My code is pure C language and does not need this code. How to remove the extra
assembly code.
TNX.