S_FORCE_RELOC intended behavior?

Rich Felker dalias@libc.org
Fri Aug 21 20:42:00 GMT 2015
A while back I reported issue #18561 which I thought was sh-specific,
but discussion on the bug tracker with Nick Clifton, who found a way
to make gas behave correctly, has revealed that the issue might be
deeper and affecting other targets too. The following commit:

https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=ae6063d440ba5ec28af81e9fc899cc099561339e;hp=f0abc2a11f47c3ecdfe0b54421092d17c70fc5f2

changed S_FORCE_RELOC so that, for some callers, it reports
expressions based on weak symbol definitions as being able to be
handled with fixups rather than requiring relocations to be emitted.
As far as I can tell, this is always incorrect; a weak definition can
always be replaced at link time.

Is anyone familiar with the code affected by the above commit able to
confirm whether my interpretation is correct and make sense of why the
changes in that commit were made?

Rich



More information about the Binutils mailing list