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: [PATCH] GAS: .reloc: Avoid lost addend in converted relocs


On Wed, May 29, 2013 at 01:15:08AM +0100, Maciej W. Rozycki wrote:
> On Wed, 29 May 2013, Alan Modra wrote:
> 
> > >  	      if (S_IS_LOCAL (sym) && !symbol_section_p (sym)
> > > -		  && !(howto->partial_inplace
> > > -		       && howto->pc_relative
> > > -		       && howto->src_mask != addr_mask))
> > > +		  && (sec->use_rela_p
> > > +		      || (howto->partial_inplace
> > > +			  && (!howto->pc_relative
> > > +			      || howto->src_mask == addr_mask))))
> > 
> > This change doesn't make sense to me.  Before, you excluded a specific
> > set of partial_inplace relocs, now you say any partial_inplace is good?
> 
>  Not really.  Before, I excluded a specific set of partial_inplace relocs 
> (pc_relative, with a narrow relocatable field), now I exclude that set 
> only on !use_rela_p targets.  Plus any !partial_inplace relocs on such 
> targets.  This is because in both cases there is no room to store an 
> addend (on !use_rela_p targets).

I misread the change.  It's fine.

-- 
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]