This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Linking images at one address, but loading them at another.
- To: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- Subject: Re: Linking images at one address, but loading them at another.
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Fri, 26 Oct 2001 16:11:20 +0100
- cc: Richard dot Earnshaw at arm dot com, Nick Clifton <nickc at cambridge dot redhat dot com>, binutils at sources dot redhat dot com
- Organization: ARM Ltd.
- Reply-To: Richard dot Earnshaw at arm dot com
> ELF specs generally assume a SYSV environment. That's typically
> fulfilled when running userland under an OS, but a kernel image is not
> usually loaded within a SYSV environment. It might even not be
> dynamically linked. ;-) Thus the binary is not SYSV-compliant anyway.
Well I know that :-)
>
> In short: use p_vaddr in a loader if it operates on virtual addresses as
> seen by the program and p_paddr if it operates on physical addresses. If
> a loader operates on virtual addresses different from the ones seen by the
> program, you should probably use p_paddr anyway.
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.
R.