This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: relocations in gas
Hello,
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;
by
if ((symsec->flags & SEC_MERGE) != 0
&& (fixp->fx_offset != 0 || fixp->fx_subsy != NULL ||
fixp->fx_addsy != NULL))
continue;
Effectively taking in account the 'add symbol'. Maybe there is a
better way to handle this?
Cheers,
JP.