[PATCH 00/10] nptl: Complete libpthread removal

Szabolcs Nagy szabolcs.nagy@arm.com
Wed May 19 13:14:55 GMT 2021


The 05/19/2021 14:35, Florian Weimer wrote:
> * Szabolcs Nagy:
> > The 05/18/2021 16:24, Florian Weimer via Libc-alpha wrote:
> >> This series finally removes libpthread for Linux/NPTL.
> >
> > sorry i don't know when this started but in libc.a
> > now i see
> >
> > cnd_wait.o:
> > 0000000000000000 T __cnd_wait
> > 0000000000000000 W cnd_wait
> >                  U __pthread_cond_wait
> >
> > and __pthread_cond_wait is not defined anywhere.
> > (only a 3 _ prefix version)
> >
> > (in cnd_wait.os i see
> >                  U __GI___pthread_cond_wait
> > which is a hidden symbol in libc.so now)
> >
> > so now static linking code with cnd_wait fails.
> 
> Ugh, I thought the linknamespace tests would cover that.
> 
> This is a generic issue related to how libc_hidden_ver is defined: It
> does not create an alias as one might expect for the static libc, but
> actually expands to nothing.  I hacked around this with an explicit
> strong_alias in some places, but it looks like I missed a few cases.
> 
> Should we try to change the definition of libc_hidden_ver, or add more
> strong_alias directives?

there are quite a few libc_hidden_ver uses and i assume
now exists many

  some_alias (foo, bar)
  libc_hidden_ver (foo, bar)

even in target specific code, which has to be changed
and tested if libc_hidden_ver is changed.

but if we always want libc_hidden_ver to create an alias
for static linking then it would be nice to fix at some
point.


More information about the Libc-alpha mailing list