This is the mail archive of the binutils@sources.redhat.com 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: relocations in gas


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]