Change in ld behavior between 2.16.1 and 2.17
Alan Modra
amodra@bigpond.net.au
Sun Sep 9 04:40:00 GMT 2007
On Wed, Sep 05, 2007 at 12:19:05PM -0500, Albert Chin wrote:
[about references to local symbols in discarded sections causing a
link error]
> Is the behavior in binutils-2.17+ correct?
Well, the linker can't guarantee to fix up the reference to point to
the proper location in the kept section. Just considering the linker
in isolation, I think it warrants an error. However, I thought this
gcc bug had been fixed long ago, but if this is occurring with 4.0.2,
perhaps we ought to downgrade the error to a warning again. (I'm
assuming that the reference was from C++ code rather than assembly,
and that your .a was actually compiled with 4.0.2)
> If so, how do we work around this issue?
Pass --noinhibit-exec to the linker.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list