[PATCH] GAS: .reloc: Avoid lost addend in converted relocs
Alan Modra
amodra@gmail.com
Wed May 29 01:32:00 GMT 2013
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
More information about the Binutils
mailing list