This is the mail archive of the
mailing list for the binutils project.
Re: ARM ELF p_paddr is not put to zero
Drasko DRASKOVIC <email@example.com> writes:
>> That is the default behaviour for the GNU tools, so that it is possible
>> to represent a load address separate from the virtual address.
> What do you exactly mean by this default behaviour ? To put p_paddr =
> p_vaddr ? In which situations ?
Conceptually, every section has a virtual address (the address where the
section should live when the program is run) and a load address (the
address where the section should be loaded). On a virtual memory
machine these are normally the same. On a device without virtual memory
and with ROM, it is often useful to load the initialized data section at
one address (in ROM) but to run with the data at another address (in
RAM). Given that, it becomes useful to use some mechanism for
representing both the load address and the virtual address in a linked
executable. The GNU tools normally store the load address in the
p_paddr field and the virtual address in the p_vaddr field.
>> ÂSo most
>> likely this unusual ARM ELF requirement has simply not been implemented.
> Would that say that GNU ld is ARM EABI (ABI v. 2.0, published after
> December 2003), but *not* OABI (ABI v. 1.0, prior to December 2003)
> compliant, because of p_paddr != 0 ?
It is certainly true that GNU ld strives to be EABI compliant.