[PATCH] GAS: .reloc: Avoid lost addend in converted relocs

Alan Modra amodra@gmail.com
Tue May 28 23:35:00 GMT 2013


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



More information about the Binutils mailing list