This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] GAS: .reloc: Avoid lost addend in converted relocs
- From: Alan Modra <amodra at gmail dot com>
- To: "Maciej W. Rozycki" <macro at codesourcery dot com>
- Cc: binutils at sourceware dot org, Richard Sandiford <rdsandiford at googlemail dot com>
- Date: Wed, 29 May 2013 09:05:04 +0930
- Subject: Re: [PATCH] GAS: .reloc: Avoid lost addend in converted relocs
- References: <alpine dot DEB dot 1 dot 10 dot 1305281410260 dot 26443 at tp dot orcam dot me dot uk>
On Tue, May 28, 2013 at 05:39:04PM +0100, Maciej W. Rozycki 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?
Maybe what you really want here is:
&& (sec->use_rela_p
|| howto->src_mask == addr_mask))
--
Alan Modra
Australia Development Lab, IBM