This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ppc64le: expected localentry:0 `pthread_condattr_destroy'


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.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]