This is the mail archive of the
mailing list for the binutils project.
Re: ppc64le: expected localentry:0 `pthread_condattr_destroy'
On Fri, Jul 28, 2017 at 02:39:13PM +0200, Florian Weimer wrote:
> On 07/28/2017 12:07 PM, Alan Modra wrote:
> > No, you misunderstood my comment about --no-plt-localentry. The
> > *user* library would need to be built with that option, which isn't a
> > good solution.
> Could you clarify how this optimization works? Is the following
> description accurate?
> At static link time, when processing a relocation to a function, the
> static link editor looks at the implementation of the called function
> (which can live in a different DSO). If the current implementation does
> not use the TOC register, the caller is adjusted to call an optimized
> PLT stub which does not set the TOC. Otherwise, a full PLT stub which
> sets the TOC is used. If the link edit chose to apply the optimization,
> there is no way to go back, and future implementations of the called
> function must never require a TOC pointer. The dynamic linker cannot
> recover and thus bails out with the localentry error message.
Yes, that's correct. If the linker doesn't see a definition, or if
the definition is weak, then the optimization does not apply.
Australia Development Lab, IBM