relocations in gas

Alan Modra amodra@bigpond.net.au
Fri Jan 21 22:48:00 GMT 2005


On Fri, Jan 21, 2005 at 02:27:32PM +0100, Jean-Philippe Bernardy wrote:
> Still on the calmrisc16 port, I encountered the problem that gas
> adjusted fixups in a mergeable section. This results in incorrect
> relocations when merge occurs at link time.
> 
> In found this fix:
> in write.c, replace 
> 
> if ((symsec->flags & SEC_MERGE) != 0
> 	    && (fixp->fx_offset != 0 || fixp->fx_subsy != NULL))
> 	  continue;

No, that code is correct.  If you need to keep the original symbol in
SEC_MERGE sections for some reason, then do so by returning zero in your
target tc_fix_adjustable function.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list