I compiled this program with -m32 -nostdlibinto an ELF executable:
void _start() {}
And when I did readelf -l, I was surprised to see that the offset in the LOAD segment was 0x000000, as this would mean that the executable header would be loaded into memory at the same time as the text segment. So I checked with GDB, and it really is:
(gdb) b _start
Breakpoint 1 at 0x8048083
(gdb) r
Starting program: /home/tbodt/ish/build/a.out
Breakpoint 1, 0x08048083 in _start ()
(gdb) x/4c 0x08048000
0x8048000: 127 '\177' 69 'E' 76 'L' 70 'F'
Why is this useful?
tbodt source
share