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: [rx,head,2.21] fix lma/vma swap when reading executables in


On Mon, May 23, 2011 at 11:58:15PM -0400, DJ Delorie wrote:
> 
> > On Mon, May 23, 2011 at 03:50:43PM -0400, DJ Delorie wrote:
> > > +  /* For each PHDR in the object, we must find some section that
> > 
> > Limit to just PT_LOAD phdrs?
> 
> You could, but it shouldn't matter - it only affects the VMA of
> segments and the LMA of sections.  The segments would only be used by,
> for example, SREC outputs, which only use PT_LOAD anyway, and sections
> are normally used for their VMA, not LMA.  I haven't verified this,
> but I think it might compute the correct values anyway - the altered
> field is not used in computations on read-in.
> 
> I'll add one if you want, though.  It would add symmetry :-) (and
> paranoia)

I think it might work better..  Other phdrs (with zero p_offset and
p_filesz) will match all sections the way you've written the tests.

-- 
Alan Modra
Australia Development Lab, IBM


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