Address Value 0x8048080

why when debugging an asm source in gdb is 0x8048080 the address selected for the starting point of entry into the code? it's just a relative offset, not an actual offset in the instruction memory, right?

+3
source share
2 answers

There is no particular meaning for the address 0x8048080, but there is one for the address 0x08048000.

The last address is the default address at which it ldlaunches the first segment PT_LOADon Linux / x86. On Linux / x86_64, the default is used 0x400000, and you can change the default value using a "custom" linker script. You can also change where it .textstarts with the flag -Wl,-Ttext,0xNNNNNNNN.

ld 0x08048000, script, , -Wl,--verbose .

0x80, .text 0x8048080, .

int main() { return 0; }, &_start == &.text 0x8048300, 0x8048178 0x8048360, , .

+2

All Articles