This is the mail archive of the glibc-bugs@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]

[Bug dynamic-link/21847] ppc64le: expected localentry:0 `pthread_…' ld.so error prevents allocation startup


https://sourceware.org/bugzilla/show_bug.cgi?id=21847

Jakub Jelinek <jakub at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at redhat dot com

--- Comment #7 from Jakub Jelinek <jakub at redhat dot com> ---
(In reply to Alan Modra from comment #6)
> > How does this optimization work?  Does the link editor detect that the
> > implementation in libpthread does not require the TOC pointer and then
> > activates the optimization?
> 
> Yes.

Note that in that case I think it can be even exact compiler version and
optimization options that affect ABI, say with -O0 or -O1 the compiler doesn't
optimize some dead, but harder to be proven as dead, access to a global
variable, while -O2 or -O3 or whatever other option could optimize that away
and make the function not using r2 anymore.

So like that the localentry change is useful only for the development models
where any single change causes rebuild of all the binaries and shared libraries
and then nothing changes until following whole world rebuild.

What could work is a shared library providing a hint to the dynamic linker,
this function doesn't need or clobber r2, say in some .dynsym flags, and only
the dynamic linker then using that information as a hint whether to use a more
or less efficient PLT sequence when calling certain symbol.  But it has to be
something only determined at runtime, there can't be anything decided at static
link time (because then some property that is not part of ABI is inlined into
binaries or shared libraries otherwise).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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