[PATCH] BZ #5784: Build libpthread.a with ld -r
H.J. Lu
hjl.tools@gmail.com
Fri Sep 7 01:10:00 GMT 2012
On Thu, Sep 6, 2012 at 3:31 PM, Roland McGrath <roland@hack.frob.com> wrote:
> The STB_GNU_SECONDARY idea seemed hairy and hard to understand, and an
> ELF extension is a lousy way to approach a problem for which almost
> any other solution can be found, for a variety of reasons. But I'd
> have to examine the proposed STB_GNU_SECONDARY semantics much more
> deeply and consider the concrete problems with static linking of
> -lpthread in far greater detail to come to a coherent opinion about
> that idea.
>
It is STB_SECONDARY in gABI now. The idea is an input file can have a backup
dentition and linker will keep searching for the real one. If no real one
is found, the backup one will be used. So csu/libc-tls.c can provide
backup pthread
functions for GCC to link in corresponding dentitions in libpthread.a.
I updated hjl/pthread branch to fix a few bugs.
H.J.
More information about the Libc-alpha
mailing list