I use the readelf utility to check (-h) an executable file, and i see the e_entry field has the value: 0x8048530 . Then i recompile the checked program and have it to print its own program entry by adding the line: printf(“%p\n”, (void*)main) and outputs: 0x80485e4. Why do i have this difference? (OS: Linux 32-bit)
Share
The entry point of an executable is usually not
mainitself but a platform specific function (that we’ll call_start) which performs initialization before callingmain.