0

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?

Community
  • 1
  • 1
MyUsername112358
  • 1,320
  • 14
  • 39

0 Answers0