This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Linking images at one address, but loading them at another.


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        +


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]