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]
Other format: [Raw text]

Re: mn10300: relaxing vs section merging


On Tue, May 25, 2004 at 07:14:34PM -0400, DJ Delorie wrote:
> 
> > It doesn't look right to me.  You are adding irel->r_addend to symval
> > where you previously did not.
> 
> That's because _bfd_elf_rela_local_sym adjusts the addend according to
> where the symbol has been (so far) relocated to.  That's the value we
> need for checking relax limits, so we need to add it in.
> 
> I don't think "previously" counts here.  It didn't work previously.

I guessed that's why you were adding irel->r_addend, but doing so will
be wrong for other symbols and relocations.  Consider non SEC_MERGE
symbols, and note later code

	  value += irel->r_addend;

so now the addend is summed twice.  That can't be correct.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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