This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Re: Load addresses for ELF program headers on ARM


On Mon, Oct 11, 2010 at 12:25:06PM +1030, Alan Modra wrote:
> On Sun, Oct 10, 2010 at 07:46:58PM -0500, Matt Fischer wrote:
> > The linker created two program headers, one for TEXT, and one for
> > DATA.  The TEXT one looks fine--both vaddr and paddr are at 0.  The
> > DATA segment, however, has a problem.  It's been given a vaddr of
> > 0x10000000, and a paddr of 0x000000b4.  The former is the section's
> > relocation address, and the latter is its load address.  However, the
> > ARM spec for ELF states that segments should have vaddr set to their
> > load address, and paddr set to 0.
> 
> Which ARM ELF spec are you talking about?  An old and buggy one, I'd
> guess.  If the one you're looking at says that it is clearly in
> conflict with the parent SysV ELF ABI spec.  This spec
> http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044b/IHI0044B_aaelf.pdf
> is silent on p_vaddr and p_paddr.

My memory on this is a bit vague, but I think that the ARM debugger
does behave as Matt described (or used to).  You should be able to
post-process the file, either with objcopy or a custom utility; it
will be a simple one.

-- 
Daniel Jacobowitz
CodeSourcery


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