The relation between e_entry and p_vaddr

Fangrui Song i@maskray.me
Sat Apr 24 04:18:41 GMT 2021


On 2021-04-23, Peng Yu via Binutils wrote:
>Hi,
>
>https://youtu.be/XH6jDiKxod8?t=439
>
>The above video says p_vaddr starts at 54 80 04 08 (little endian)
>according to the following figure from
>http://www.sco.com/developers/devspecs/abi386-4.pdf.
>
>Figure 3-25: Conventional Segment Arrangements
>
>But I think this is related to what e_entry is defined.
>
>I changed both p_vaddr and e_entry to 54 80 04 18 in the program
>(shown in the following link). The program still works. So as long as
>p_vaddr and e_entry match it should be fine?
>
>https://dacvs.neocities.org/1exit.html
>
>The requirement that text starts at 0x8048000 in Figure 3-25 is artificial?
>
>-- 
>Regards,
>Peng

https://sourceware.org/binutils/docs/ld/Entry-Point.html

There needs to be an executable PT_LOAD containing e_entry.
For most loaders, the ELF header and program headers need to be loaded.


More information about the Binutils mailing list