[v4,00/37] libpthread: Remove NPTL forwarders

Message ID cover.1618564630.git.fweimer@redhat.com
Headers
Series libpthread: Remove NPTL forwarders |

Message

Florian Weimer April 16, 2021, 9:20 a.m. UTC
  I was on pseudo-vacation for a while and then some urgent downstream
work came up.  Sorry.  I hope to return to libpthread work part-time
next week, and full time after that.  Hopefully this will get us back on
track.

I believe this series addresses all of Adhemerval's review comments.  It
switches to OTHER_SHLIB_COMPAT.  I've retested this on i686-linux-gnu
and x86_64-linux-gnu, and built the entire thing with
build-many-glibcs.py.

Thanks,
Florian

Adhemerval Zanella (1):
  x86: Restore compile-time check for shadow stack pointer in longjmp

Florian Weimer (36):
  nptl: Move pthread_mutex_consistent into libc
  nptl: Move __pthread_cleanup_routine into libc
  nptl: Move legacy unwinding implementation into libc
  nptl: Move legacy cancelation handling into libc as compat symbols
  nptl: Remove longjmp, siglongjmp from libpthread
  nptl: Move __pthread_cleanup_upto into libc
  nptl: Move pthread_once and __pthread_once into libc
  nptl: Move __pthread_unwind_next into libc
  csu: Move calling main out of __libc_start_main_impl
  nptl: Move internal __nptl_nthreads variable into libc
  nptl_db: Introduce DB_MAIN_ARRAY_VARIABLE
  nptl: Move __pthread_keys global variable into libc
  nptl: Move __nptl_deallocate_tsd into libc
  nptl: Move pthread_exit into libc
  nptl: Move pthread_setcancelstate into libc
  nptl: Move pthread_setcanceltype into libc
  nptl: Invoke the set_robust_list system call directly in fork
  dlfcn: Failures after dlmopen should not terminate process [BZ #24772]
  dlfcn: dlerror needs to call free from the base namespace [BZ #24773]
  Remove pthread_key_create-related internals from libc-lock.h
  elf: Introduce __tls_init_tp for second-phase TCB initialization
  nptl: Move part of TCB initialization from libpthread to __tls_init_tp
  nptl: Move pthread_key_create, __pthread_key_create into libc
  nptl: Move pthread_getspecific, __pthread_getspecific into libc
  nptl: Move pthread_setspecific, __pthread_setspecific into libc
  nptl: Move pthread_key_delete into libc.
  nptl: Move rwlock functions with forwarders into libc
  nptl: Move the internal thread priority protection symbols into libc
  pthread: Introduce __pthread_early_init
  nptl: Move internal symbol __mutex_aconf into libc
  nptl: pthread_mutex_lock, pthread_mutex_unock single-threaded
    optimization
  x86: Remove low-level lock optimization
  nptl: Move core mutex functions into libc
  nptl: Move core condition variable functions into libc
  nptl: Move setxid broadcast implementation into libc
  nptl: Remove remnants of the libc/libpthread forwarder interface

 NEWS                                          |   4 +-
 csu/libc-start.c                              |  74 +----
 csu/libc-tls.c                                |   8 +-
 dlfcn/Makefile                                |   3 +-
 dlfcn/Versions                                |   6 +-
 dlfcn/dlerror.c                               | 303 ++++++++----------
 dlfcn/dlerror.h                               |  92 ++++++
 dlfcn/libc_dlerror_result.c                   |  39 +++
 elf/Makefile                                  |  12 +-
 elf/dl-error-skeleton.c                       |  12 +
 elf/dl-exception.c                            |  11 +
 elf/dl-tls_init_tp.c                          |  24 ++
 elf/libc_early_init.c                         |   3 +
 elf/rtld.c                                    |  16 +-
 elf/tst-dlmopen-dlerror-mod.c                 |  58 ++++
 elf/tst-dlmopen-dlerror.c                     |  49 +++
 include/dlfcn.h                               |   2 -
 include/setjmp.h                              |   4 +-
 libio/iopopen.c                               |   5 +-
 malloc/set-freeres.c                          |  10 +-
 malloc/thread-freeres.c                       |   2 +
 misc/error.c                                  |  19 +-
 nptl/Makefile                                 |  92 +++---
 nptl/Versions                                 | 133 +++++---
 nptl/allocatestack.c                          | 209 ------------
 nptl/cleanup_compat.c                         |  18 +-
 nptl/cleanup_defer_compat.c                   |  72 +----
 nptl/cleanup_routine.c                        |  11 +-
 nptl/forward.c                                | 131 --------
 nptl/libc-cleanup.c                           |  64 +++-
 nptl/libc_pthread_init.c                      |  35 +-
 nptl/libpthread-compat.c                      |   5 +
 nptl/nptl-init.c                              | 152 +--------
 nptl/nptl_deallocate_tsd.c                    | 112 +++++++
 nptl/nptl_nthreads.c                          |  23 ++
 nptl/nptl_setxid.c                            | 279 ++++++++++++++++
 nptl/old_pthread_cond_broadcast.c             |   2 +-
 nptl/old_pthread_cond_signal.c                |   2 +-
 nptl/old_pthread_cond_timedwait.c             |   2 +-
 nptl/old_pthread_cond_wait.c                  |   2 +-
 nptl/pt-longjmp.c                             |  49 ---
 nptl/pthreadP.h                               | 111 ++++---
 nptl/pthread_cancel.c                         |  10 +-
 nptl/{pt-cleanup.c => pthread_cleanup_upto.c} |   2 +-
 nptl/pthread_cond_broadcast.c                 |  10 +-
 nptl/pthread_cond_signal.c                    |   8 +-
 nptl/pthread_cond_wait.c                      |  62 ++--
 nptl/pthread_create.c                         | 102 +-----
 nptl/pthread_exit.c                           |  20 +-
 nptl/pthread_getspecific.c                    |  18 +-
 nptl/pthread_key_create.c                     |  20 +-
 nptl/pthread_key_delete.c                     |  16 +-
 nptl/pthread_keys.c                           |  24 ++
 nptl/pthread_mutex_cond_lock.c                |   4 +-
 nptl/pthread_mutex_conf.c                     |   1 +
 nptl/pthread_mutex_consistent.c               |  18 +-
 nptl/pthread_mutex_destroy.c                  |  16 +-
 nptl/pthread_mutex_init.c                     |  16 +-
 nptl/pthread_mutex_lock.c                     |  47 ++-
 nptl/pthread_mutex_unlock.c                   |  34 +-
 nptl/pthread_once.c                           |  15 +-
 nptl/pthread_rwlock_rdlock.c                  |  16 +-
 nptl/pthread_rwlock_unlock.c                  |  18 +-
 nptl/pthread_rwlock_wrlock.c                  |  16 +-
 nptl/pthread_setcancelstate.c                 |   6 +-
 nptl/pthread_setcanceltype.c                  |   3 +-
 nptl/pthread_setspecific.c                    |  20 +-
 nptl/tpp.c                                    |   6 +-
 nptl/tst-cleanup4.c                           |   5 +
 nptl/tst-cleanup4aux.c                        |   5 +
 nptl/tst-pthread_exit-nothreads-static.c      |  19 ++
 nptl/tst-pthread_exit-nothreads.c             |  28 ++
 nptl/unwind.c                                 |  13 +-
 nptl/vars.c                                   |   5 -
 nptl_db/db-symbols.awk                        |   1 +
 nptl_db/structs.def                           |   9 +-
 setjmp/Versions                               |   4 -
 stdlib/fmtmsg.c                               |   9 +-
 sysdeps/arm/Makefile                          |   5 -
 sysdeps/arm/nptl/unwind-forcedunwind.c        |  25 --
 sysdeps/arm/pt-arm-unwind-resume.S            |  20 --
 sysdeps/generic/ldsodefs.h                    |  21 ++
 sysdeps/generic/libc-lock.h                   |  12 -
 sysdeps/generic/libc_start_call_main.h        |  24 ++
 sysdeps/generic/unwind-resume.c               |  14 +
 sysdeps/htl/libc-lockP.h                      |  13 -
 sysdeps/i386/nptl/pthread_spin_lock.S         |   1 -
 .../unwind-resume.c}                          |   5 +-
 sysdeps/nptl/dl-tls_init_tp.c                 |  67 ++++
 sysdeps/nptl/fork.c                           |  14 +-
 sysdeps/nptl/jmp-unwind.c                     |   8 +-
 sysdeps/nptl/libc-lock.h                      |  59 ++--
 sysdeps/nptl/libc-lockP.h                     | 160 ++-------
 sysdeps/nptl/libc_start_call_main.h           |  74 +++++
 sysdeps/nptl/pthread-functions.h              |  88 -----
 sysdeps/nptl/pthread.h                        |  10 +-
 .../nptl/pthread_early_init.h                 |  22 +-
 {nptl => sysdeps/nptl}/pthread_mutex_conf.h   |   9 +-
 sysdeps/nptl/setxid.h                         |  26 +-
 sysdeps/nptl/unwind-forcedunwind.c            |  64 ----
 sysdeps/posix/system.c                        |   5 +-
 sysdeps/powerpc/Versions                      |   4 -
 sysdeps/powerpc/longjmp.c                     |  14 +-
 sysdeps/pthread/Makefile                      |   2 +-
 sysdeps/pthread/pthread_early_init.h          |  29 ++
 .../pthread/pthread_mutex_conf.h              |  17 +-
 sysdeps/pthread/tst-robust1.c                 |   4 +-
 sysdeps/pthread/tst-robust8.c                 |   2 +-
 sysdeps/pthread/tst-robust9.c                 |   4 +-
 sysdeps/unix/sysv/linux/aarch64/libc.abilist  |  48 +++
 .../sysv/linux/aarch64/libpthread.abilist     |  41 ---
 sysdeps/unix/sysv/linux/alpha/libc.abilist    |  48 +++
 .../unix/sysv/linux/alpha/libpthread.abilist  |  46 +--
 sysdeps/unix/sysv/linux/arc/libc.abilist      |  48 +++
 .../unix/sysv/linux/arc/libpthread.abilist    |  39 ---
 sysdeps/unix/sysv/linux/arm/be/libc.abilist   |  48 +++
 .../unix/sysv/linux/arm/be/libpthread.abilist |  41 ---
 sysdeps/unix/sysv/linux/arm/le/libc.abilist   |  48 +++
 .../unix/sysv/linux/arm/le/libpthread.abilist |  41 ---
 sysdeps/unix/sysv/linux/csky/libc.abilist     |  48 +++
 .../unix/sysv/linux/csky/libpthread.abilist   |  39 ---
 sysdeps/unix/sysv/linux/fatal-prepare.h       |   4 +-
 sysdeps/unix/sysv/linux/hppa/libc.abilist     |  48 +++
 .../unix/sysv/linux/hppa/libpthread.abilist   |  46 +--
 sysdeps/unix/sysv/linux/i386/libc.abilist     |  48 +++
 .../unix/sysv/linux/i386/libpthread.abilist   |  46 +--
 sysdeps/unix/sysv/linux/ia64/Makefile         |   2 +-
 sysdeps/unix/sysv/linux/ia64/libc.abilist     |  48 +++
 .../unix/sysv/linux/ia64/libpthread.abilist   |  46 +--
 sysdeps/unix/sysv/linux/internal-signals.h    |   4 -
 .../sysv/linux/m68k/coldfire/libc.abilist     |  48 +++
 .../linux/m68k/coldfire/libpthread.abilist    |  41 ---
 .../unix/sysv/linux/m68k/m680x0/libc.abilist  |  48 +++
 .../sysv/linux/m68k/m680x0/libpthread.abilist |  46 +--
 .../sysv/linux/microblaze/be/libc.abilist     |  48 +++
 .../linux/microblaze/be/libpthread.abilist    |  41 ---
 .../sysv/linux/microblaze/le/libc.abilist     |  48 +++
 .../linux/microblaze/le/libpthread.abilist    |  41 ---
 .../sysv/linux/mips/mips32/fpu/libc.abilist   |  48 +++
 .../sysv/linux/mips/mips32/libpthread.abilist |  46 +--
 .../sysv/linux/mips/mips32/nofpu/libc.abilist |  48 +++
 .../sysv/linux/mips/mips64/libpthread.abilist |  46 +--
 .../sysv/linux/mips/mips64/n32/libc.abilist   |  48 +++
 .../sysv/linux/mips/mips64/n64/libc.abilist   |  48 +++
 sysdeps/unix/sysv/linux/nios2/libc.abilist    |  48 +++
 .../unix/sysv/linux/nios2/libpthread.abilist  |  41 ---
 .../linux/powerpc/powerpc32/fpu/libc.abilist  |  48 +++
 .../powerpc/powerpc32/libpthread.abilist      |  48 +--
 .../powerpc/powerpc32/nofpu/libc.abilist      |  48 +++
 .../linux/powerpc/powerpc64/be/libc.abilist   |  48 +++
 .../powerpc/powerpc64/be/libpthread.abilist   |  48 +--
 .../linux/powerpc/powerpc64/le/libc.abilist   |  48 +++
 .../powerpc/powerpc64/le/libpthread.abilist   |  41 ---
 sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c  |  61 ----
 sysdeps/unix/sysv/linux/pthread-pids.h        |  29 --
 .../unix/sysv/linux/riscv/rv32/libc.abilist   |  48 +++
 .../sysv/linux/riscv/rv32/libpthread.abilist  |  39 ---
 .../unix/sysv/linux/riscv/rv64/libc.abilist   |  48 +++
 .../sysv/linux/riscv/rv64/libpthread.abilist  |  39 ---
 sysdeps/unix/sysv/linux/s390/Versions         |   2 +-
 sysdeps/unix/sysv/linux/s390/jmp-unwind.c     |   7 +-
 .../unix/sysv/linux/s390/libpthread-compat.c  |  25 ++
 sysdeps/unix/sysv/linux/s390/pt-longjmp.c     |  33 --
 .../unix/sysv/linux/s390/s390-32/libc.abilist |  48 +++
 .../linux/s390/s390-32/libpthread.abilist     |  49 +--
 .../unix/sysv/linux/s390/s390-64/libc.abilist |  48 +++
 .../linux/s390/s390-64/libpthread.abilist     |  49 +--
 sysdeps/unix/sysv/linux/sh/be/libc.abilist    |  48 +++
 .../unix/sysv/linux/sh/be/libpthread.abilist  |  46 +--
 sysdeps/unix/sysv/linux/sh/le/libc.abilist    |  48 +++
 .../unix/sysv/linux/sh/le/libpthread.abilist  |  46 +--
 .../sysv/linux/sparc/sparc32/libc.abilist     |  48 +++
 .../linux/sparc/sparc32/libpthread.abilist    |  46 +--
 .../sysv/linux/sparc/sparc64/libc.abilist     |  48 +++
 .../linux/sparc/sparc64/libpthread.abilist    |  46 +--
 sysdeps/unix/sysv/linux/spawni.c              |   5 +-
 sysdeps/unix/sysv/linux/x86/longjmp.c         |  39 +++
 sysdeps/unix/sysv/linux/x86/lowlevellock.h    |  87 -----
 .../unix/sysv/linux/x86_64/64/libc.abilist    |  48 +++
 .../sysv/linux/x86_64/64/libpthread.abilist   |  46 +--
 .../unix/sysv/linux/x86_64/x32/libc.abilist   |  48 +++
 .../sysv/linux/x86_64/x32/libpthread.abilist  |  41 ---
 sysdeps/x86/nptl/pt-longjmp.c                 |  71 ----
 sysdeps/x86_64/nptl/pthread_spin_lock.S       |   1 -
 184 files changed, 3567 insertions(+), 3318 deletions(-)
 create mode 100644 dlfcn/dlerror.h
 create mode 100644 dlfcn/libc_dlerror_result.c
 create mode 100644 elf/dl-tls_init_tp.c
 create mode 100644 elf/tst-dlmopen-dlerror-mod.c
 create mode 100644 elf/tst-dlmopen-dlerror.c
 delete mode 100644 nptl/forward.c
 create mode 100644 nptl/nptl_deallocate_tsd.c
 create mode 100644 nptl/nptl_nthreads.c
 create mode 100644 nptl/nptl_setxid.c
 delete mode 100644 nptl/pt-longjmp.c
 rename nptl/{pt-cleanup.c => pthread_cleanup_upto.c} (98%)
 create mode 100644 nptl/pthread_keys.c
 create mode 100644 nptl/tst-pthread_exit-nothreads-static.c
 create mode 100644 nptl/tst-pthread_exit-nothreads.c
 delete mode 100644 sysdeps/arm/nptl/unwind-forcedunwind.c
 delete mode 100644 sysdeps/arm/pt-arm-unwind-resume.S
 create mode 100644 sysdeps/generic/libc_start_call_main.h
 rename sysdeps/{unix/sysv/linux/ia64/unwind-forcedunwind.c => ia64/unwind-resume.c} (87%)
 create mode 100644 sysdeps/nptl/dl-tls_init_tp.c
 create mode 100644 sysdeps/nptl/libc_start_call_main.h
 delete mode 100644 sysdeps/nptl/pthread-functions.h
 rename nptl/pthread-pids.h => sysdeps/nptl/pthread_early_init.h (61%)
 rename {nptl => sysdeps/nptl}/pthread_mutex_conf.h (86%)
 delete mode 100644 sysdeps/nptl/unwind-forcedunwind.c
 create mode 100644 sysdeps/pthread/pthread_early_init.h
 rename dlfcn/dlfreeres.c => sysdeps/pthread/pthread_mutex_conf.h (74%)
 delete mode 100644 sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c
 delete mode 100644 sysdeps/unix/sysv/linux/pthread-pids.h
 create mode 100644 sysdeps/unix/sysv/linux/s390/libpthread-compat.c
 delete mode 100644 sysdeps/unix/sysv/linux/s390/pt-longjmp.c
 create mode 100644 sysdeps/unix/sysv/linux/x86/longjmp.c
 delete mode 100644 sysdeps/unix/sysv/linux/x86/lowlevellock.h
 delete mode 100644 sysdeps/x86/nptl/pt-longjmp.c
  

Comments

Florian Weimer April 21, 2021, 11:47 a.m. UTC | #1
* Florian Weimer via Libc-alpha:

> I was on pseudo-vacation for a while and then some urgent downstream
> work came up.  Sorry.  I hope to return to libpthread work part-time
> next week, and full time after that.  Hopefully this will get us back on
> track.
>
> I believe this series addresses all of Adhemerval's review comments.  It
> switches to OTHER_SHLIB_COMPAT.  I've retested this on i686-linux-gnu
> and x86_64-linux-gnu, and built the entire thing with
> build-many-glibcs.py.

What's the next step for this series?  Should I push it?

Thanks,
Florian
  
H.J. Lu April 21, 2021, 1:42 p.m. UTC | #2
On Wed, Apr 21, 2021 at 6:06 AM Florian Weimer via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> * Florian Weimer via Libc-alpha:
>
> > I was on pseudo-vacation for a while and then some urgent downstream
> > work came up.  Sorry.  I hope to return to libpthread work part-time
> > next week, and full time after that.  Hopefully this will get us back on
> > track.
> >
> > I believe this series addresses all of Adhemerval's review comments.  It
> > switches to OTHER_SHLIB_COMPAT.  I've retested this on i686-linux-gnu
> > and x86_64-linux-gnu, and built the entire thing with
> > build-many-glibcs.py.
>
> What's the next step for this series?  Should I push it?
>

Please push it.

Thanks.
  
Szabolcs Nagy April 22, 2021, 7:35 a.m. UTC | #3
The 04/21/2021 13:47, Florian Weimer via Libc-alpha wrote:
> * Florian Weimer via Libc-alpha:
> 
> > I was on pseudo-vacation for a while and then some urgent downstream
> > work came up.  Sorry.  I hope to return to libpthread work part-time
> > next week, and full time after that.  Hopefully this will get us back on
> > track.
> >
> > I believe this series addresses all of Adhemerval's review comments.  It
> > switches to OTHER_SHLIB_COMPAT.  I've retested this on i686-linux-gnu
> > and x86_64-linux-gnu, and built the entire thing with
> > build-many-glibcs.py.
> 
> What's the next step for this series?  Should I push it?

on arm buildbot i see build failure:

a - posix/getresuid</span><span class="stderr">/tmp/ccg97Xth.s: Assembler messages:
/tmp/ccg97Xth.s:210: Error: `__nptl_set_robust_list_avail&#39; can&#39;t be equated to common symbol `__GI___nptl_set_robust_list_avail&#39;
make[2]: *** [/work/glibc-armhf-linux/build/build/sysd-rules:161: /work/glibc-armhf-linux/build/build/elf/dl-tls_init_tp.os] Error 1
</span><span class="stdout">.o
  
Florian Weimer April 22, 2021, 7:58 a.m. UTC | #4
* Szabolcs Nagy:

> The 04/21/2021 13:47, Florian Weimer via Libc-alpha wrote:
>> * Florian Weimer via Libc-alpha:
>> 
>> > I was on pseudo-vacation for a while and then some urgent downstream
>> > work came up.  Sorry.  I hope to return to libpthread work part-time
>> > next week, and full time after that.  Hopefully this will get us back on
>> > track.
>> >
>> > I believe this series addresses all of Adhemerval's review comments.  It
>> > switches to OTHER_SHLIB_COMPAT.  I've retested this on i686-linux-gnu
>> > and x86_64-linux-gnu, and built the entire thing with
>> > build-many-glibcs.py.
>> 
>> What's the next step for this series?  Should I push it?
>
> on arm buildbot i see build failure:
>
> a - posix/getresuid</span><span class="stderr">/tmp/ccg97Xth.s: Assembler messages:
> /tmp/ccg97Xth.s:210: Error: `__nptl_set_robust_list_avail&#39; can&#39;t be equated to common symbol `__GI___nptl_set_robust_list_avail&#39;
> make[2]: *** [/work/glibc-armhf-linux/build/build/sysd-rules:161: /work/glibc-armhf-linux/build/build/elf/dl-tls_init_tp.os] Error 1
> </span><span class="stdout">.o

Sorry, I didn't try building with GCC before 10 on these architectures.
Please try the patch below.

Thanks,
Florian

nptl: __nptl_set_robust_list_avail must be nocommon
    
This is required for GCC versions before 10 which default to -fcommon.

Fixes commit 442e8a40da9dfa24aeebf4f1a163f0a58b12cf7e ("nptl: Move part
of TCB initialization from libpthread to __tls_init_tp").

diff --git a/sysdeps/nptl/dl-tls_init_tp.c b/sysdeps/nptl/dl-tls_init_tp.c
index c5172b7613..05d2b6cfcc 100644
--- a/sysdeps/nptl/dl-tls_init_tp.c
+++ b/sysdeps/nptl/dl-tls_init_tp.c
@@ -23,7 +23,7 @@
 #include <tls.h>
 
 #ifndef __ASSUME_SET_ROBUST_LIST
-bool __nptl_set_robust_list_avail;
+bool __nptl_set_robust_list_avail __attribute__ ((nocommon));
 rtld_hidden_data_def (__nptl_set_robust_list_avail)
 #endif
  
Szabolcs Nagy April 22, 2021, 8:56 a.m. UTC | #5
The 04/22/2021 09:58, Florian Weimer wrote:
> * Szabolcs Nagy:
> > The 04/21/2021 13:47, Florian Weimer via Libc-alpha wrote:
> >> * Florian Weimer via Libc-alpha:
> >> 
> >> > I was on pseudo-vacation for a while and then some urgent downstream
> >> > work came up.  Sorry.  I hope to return to libpthread work part-time
> >> > next week, and full time after that.  Hopefully this will get us back on
> >> > track.
> >> >
> >> > I believe this series addresses all of Adhemerval's review comments.  It
> >> > switches to OTHER_SHLIB_COMPAT.  I've retested this on i686-linux-gnu
> >> > and x86_64-linux-gnu, and built the entire thing with
> >> > build-many-glibcs.py.
> >> 
> >> What's the next step for this series?  Should I push it?
> >
> > on arm buildbot i see build failure:
> >
> > a - posix/getresuid</span><span class="stderr">/tmp/ccg97Xth.s: Assembler messages:
> > /tmp/ccg97Xth.s:210: Error: `__nptl_set_robust_list_avail&#39; can&#39;t be equated to common symbol `__GI___nptl_set_robust_list_avail&#39;
> > make[2]: *** [/work/glibc-armhf-linux/build/build/sysd-rules:161: /work/glibc-armhf-linux/build/build/elf/dl-tls_init_tp.os] Error 1
> > </span><span class="stdout">.o
> 
> Sorry, I didn't try building with GCC before 10 on these architectures.
> Please try the patch below.

thanks this fixes the problem for me.


> 
> Thanks,
> Florian
> 
> nptl: __nptl_set_robust_list_avail must be nocommon
>     
> This is required for GCC versions before 10 which default to -fcommon.
> 
> Fixes commit 442e8a40da9dfa24aeebf4f1a163f0a58b12cf7e ("nptl: Move part
> of TCB initialization from libpthread to __tls_init_tp").
> 
> diff --git a/sysdeps/nptl/dl-tls_init_tp.c b/sysdeps/nptl/dl-tls_init_tp.c
> index c5172b7613..05d2b6cfcc 100644
> --- a/sysdeps/nptl/dl-tls_init_tp.c
> +++ b/sysdeps/nptl/dl-tls_init_tp.c
> @@ -23,7 +23,7 @@
>  #include <tls.h>
>  
>  #ifndef __ASSUME_SET_ROBUST_LIST
> -bool __nptl_set_robust_list_avail;
> +bool __nptl_set_robust_list_avail __attribute__ ((nocommon));
>  rtld_hidden_data_def (__nptl_set_robust_list_avail)
>  #endif
>  


--