start of text section in the ELF executable and in the Virtual
Memory
asp imho
asp654 at gmail.com
Sun Sep 2 02:44:15 UTC 2012
Hi all,
I've a generic question about how the program looks before and after it is
loaded into the memory.
I see that the TEXT_START_ADDR = 0x08048000 (found this in
~src/contrib/binutils/ld/emulparams/elf_i386.sh)
when I do a procstat -v <PID>, I see some thing like this
PID START END PRT .........
PATH
2126 0x8048000 0x0804a000 r-x .........
/bin/cat
I see that the VM address is same as that of the TEXT_START_ADDR. Does this
mean that the actual begining of the program statement, `cat` in this case,
has a VM address of 0x8048000.
Looking at the Permission Flags (PRT = r-x) I assumed this is the text
section.
But when I do a objdump of /bin/cat (cmd: `objdump -D /bin/cat`), I see
that there is a section named `.interp` starting at 0x8048134 and not
0x8048000. And the .text section starts from 0x8048b40 and there is no
instruction at address 0x8048000. Can someone please tell me why is this
so? and what exactly will be present in the memory from 0x8048000 and
0x8048134.
Thanks.
More information about the freebsd-hackers
mailing list