在 2024-10-17 17:13, ericxu...@protonmail.com 写道:
Using your method, I replaced "int main()" with "int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nShowCmd)", and the result was more assembly code added than the previous version. After reverse
engineering,
在 2024-10-17 16:07, Ericxu833--- via Gcc 写道:
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.
Yes, mostly.
My code is pure C la
Hi Ericxu833,
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 ins
gcc version 14.2.0 (Rev1, Built by MSYS2 project)
//test.c
#include
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