This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Change in ld behavior between 2.16.1 and 2.17
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Sun, 9 Sep 2007 14:10:01 +0930
- Subject: Re: Change in ld behavior between 2.16.1 and 2.17
- References: <20070905171905.GA36316@mail1.thewrittenword.com>
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