Linking images at one address, but loading them at another.
Maciej W. Rozycki
macro@ds2.pg.gda.pl
Fri Oct 26 08:30:00 GMT 2001
On Fri, 26 Oct 2001, Richard Earnshaw wrote:
> That doesn't help me much. The loader (which is built into the ARM AXD
> debugger) uses only p_vaddr, so I need to make my image use that.
>
> The issue is, why is ld preventing me from doing what I need to do?
> Putting seeks to negative output-file offsets sounds like a linker bug to
> me.
What you described in your original mail indicates you need to load
image's segments at different addresses than the segments' p_vaddr. The
proper way to do it is via using the the AT keyword in your PHDRS command
(you may do it indirectly in the SECTIONS command as well). It sets the
p_paddr value of the respective segment, otherwise p_paddr just equals to
p_vaddr.
I you can't persuade your loader to use p_paddr and it uses p_vaddr
instead, then it's a bug in the loader. It uses physical addresses after
all. You need to fix the loader.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
More information about the Binutils
mailing list