After having read this: How to change entry point of C program with gcc ?
I tested the answer with this code:
int entry()
{
return 10;
}
Then I compiled it with gcc:
gcc -Wl,--entry=entry -nostartfiles custom_entry.c
It successfully compiles, but when I try to run it I get a segmentation fault. Anyone knows why?