Browse Source

nptl: Remove pthread raise implementation

The Linux version already target the current thread by using tgkill
along with getpid and gettid.

For arm, libpthread does not do a intra PLT since it will call the
raise from libc.

Checked on x86_64-linux-gnu.
nsz/bug19329-v2
Adhemerval Zanella 5 years ago
parent
commit
ff1e342cd1
  1. 1
      nptl/Makefile
  2. 1
      nptl/Versions
  3. 29
      nptl/pt-raise.c
  4. 1
      sysdeps/unix/sysv/linux/aarch64/libpthread.abilist
  5. 1
      sysdeps/unix/sysv/linux/alpha/libpthread.abilist
  6. 1
      sysdeps/unix/sysv/linux/arc/libpthread.abilist
  7. 1
      sysdeps/unix/sysv/linux/arm/be/libpthread.abilist
  8. 1
      sysdeps/unix/sysv/linux/arm/le/libpthread.abilist
  9. 1
      sysdeps/unix/sysv/linux/arm/localplt.data
  10. 1
      sysdeps/unix/sysv/linux/csky/libpthread.abilist
  11. 1
      sysdeps/unix/sysv/linux/hppa/libpthread.abilist
  12. 1
      sysdeps/unix/sysv/linux/i386/libpthread.abilist
  13. 1
      sysdeps/unix/sysv/linux/ia64/libpthread.abilist
  14. 1
      sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist
  15. 1
      sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist
  16. 1
      sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist
  17. 1
      sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist
  18. 1
      sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist
  19. 1
      sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist
  20. 1
      sysdeps/unix/sysv/linux/nios2/libpthread.abilist
  21. 1
      sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist
  22. 1
      sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist
  23. 1
      sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist
  24. 20
      sysdeps/unix/sysv/linux/pt-raise.c
  25. 1
      sysdeps/unix/sysv/linux/riscv/rv32/libpthread.abilist
  26. 1
      sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist
  27. 1
      sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist
  28. 1
      sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist
  29. 1
      sysdeps/unix/sysv/linux/sh/be/libpthread.abilist
  30. 1
      sysdeps/unix/sysv/linux/sh/le/libpthread.abilist
  31. 1
      sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist
  32. 1
      sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist
  33. 1
      sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
  34. 1
      sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist

1
nptl/Makefile

@ -103,7 +103,6 @@ libpthread-routines = \
pt-cleanup \
pt-interp \
pt-longjmp \
pt-raise \
pthread_attr_getaffinity \
pthread_attr_getguardsize \
pthread_attr_getstack \

1
nptl/Versions

@ -161,7 +161,6 @@ libpthread {
pthread_setspecific;
pthread_sigmask;
pthread_testcancel;
raise;
sem_destroy;
sem_getvalue;
sem_init;

29
nptl/pt-raise.c

@ -1,29 +0,0 @@
/* ISO C raise function for libpthread.
Copyright (C) 2002-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#include <pthread.h>
#include <signal.h>
int
raise (int sig)
{
/* This is what POSIX says must happen. */
return pthread_kill (pthread_self (), sig);
}

1
sysdeps/unix/sysv/linux/aarch64/libpthread.abilist

@ -136,7 +136,6 @@ GLIBC_2.17 pthread_testcancel F
GLIBC_2.17 pthread_timedjoin_np F
GLIBC_2.17 pthread_tryjoin_np F
GLIBC_2.17 pthread_yield F
GLIBC_2.17 raise F
GLIBC_2.17 sem_close F
GLIBC_2.17 sem_destroy F
GLIBC_2.17 sem_getvalue F

1
sysdeps/unix/sysv/linux/alpha/libpthread.abilist

@ -52,7 +52,6 @@ GLIBC_2.0 pthread_setcancelstate F
GLIBC_2.0 pthread_setcanceltype F
GLIBC_2.0 pthread_setspecific F
GLIBC_2.0 pthread_testcancel F
GLIBC_2.0 raise F
GLIBC_2.0 sem_destroy F
GLIBC_2.0 sem_getvalue F
GLIBC_2.0 sem_init F

1
sysdeps/unix/sysv/linux/arc/libpthread.abilist

@ -155,7 +155,6 @@ GLIBC_2.32 pthread_testcancel F
GLIBC_2.32 pthread_timedjoin_np F
GLIBC_2.32 pthread_tryjoin_np F
GLIBC_2.32 pthread_yield F
GLIBC_2.32 raise F
GLIBC_2.32 sem_clockwait F
GLIBC_2.32 sem_close F
GLIBC_2.32 sem_destroy F

1
sysdeps/unix/sysv/linux/arm/be/libpthread.abilist

@ -165,7 +165,6 @@ GLIBC_2.4 pthread_testcancel F
GLIBC_2.4 pthread_timedjoin_np F
GLIBC_2.4 pthread_tryjoin_np F
GLIBC_2.4 pthread_yield F
GLIBC_2.4 raise F
GLIBC_2.4 sem_close F
GLIBC_2.4 sem_destroy F
GLIBC_2.4 sem_getvalue F

1
sysdeps/unix/sysv/linux/arm/le/libpthread.abilist

@ -165,7 +165,6 @@ GLIBC_2.4 pthread_testcancel F
GLIBC_2.4 pthread_timedjoin_np F
GLIBC_2.4 pthread_tryjoin_np F
GLIBC_2.4 pthread_yield F
GLIBC_2.4 raise F
GLIBC_2.4 sem_close F
GLIBC_2.4 sem_destroy F
GLIBC_2.4 sem_getvalue F

1
sysdeps/unix/sysv/linux/arm/localplt.data

@ -5,7 +5,6 @@ libc.so: memalign
libc.so: raise
libc.so: realloc
libm.so: matherr
libpthread.so: raise
# The dynamic loader needs __tls_get_addr for TLS.
ld.so: __tls_get_addr
# The TLS-enabled version of these functions is interposed from libc.so.

1
sysdeps/unix/sysv/linux/csky/libpthread.abilist

@ -150,7 +150,6 @@ GLIBC_2.29 pthread_testcancel F
GLIBC_2.29 pthread_timedjoin_np F
GLIBC_2.29 pthread_tryjoin_np F
GLIBC_2.29 pthread_yield F
GLIBC_2.29 raise F
GLIBC_2.29 sem_close F
GLIBC_2.29 sem_destroy F
GLIBC_2.29 sem_getvalue F

1
sysdeps/unix/sysv/linux/hppa/libpthread.abilist

@ -116,7 +116,6 @@ GLIBC_2.2 pthread_spin_trylock F
GLIBC_2.2 pthread_spin_unlock F
GLIBC_2.2 pthread_testcancel F
GLIBC_2.2 pthread_yield F
GLIBC_2.2 raise F
GLIBC_2.2 sem_close F
GLIBC_2.2 sem_destroy F
GLIBC_2.2 sem_getvalue F

1
sysdeps/unix/sysv/linux/i386/libpthread.abilist

@ -52,7 +52,6 @@ GLIBC_2.0 pthread_setcancelstate F
GLIBC_2.0 pthread_setcanceltype F
GLIBC_2.0 pthread_setspecific F
GLIBC_2.0 pthread_testcancel F
GLIBC_2.0 raise F
GLIBC_2.0 sem_destroy F
GLIBC_2.0 sem_getvalue F
GLIBC_2.0 sem_init F

1
sysdeps/unix/sysv/linux/ia64/libpthread.abilist

@ -116,7 +116,6 @@ GLIBC_2.2 pthread_spin_trylock F
GLIBC_2.2 pthread_spin_unlock F
GLIBC_2.2 pthread_testcancel F
GLIBC_2.2 pthread_yield F
GLIBC_2.2 raise F
GLIBC_2.2 sem_close F
GLIBC_2.2 sem_destroy F
GLIBC_2.2 sem_getvalue F

1
sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist

@ -165,7 +165,6 @@ GLIBC_2.4 pthread_testcancel F
GLIBC_2.4 pthread_timedjoin_np F
GLIBC_2.4 pthread_tryjoin_np F
GLIBC_2.4 pthread_yield F
GLIBC_2.4 raise F
GLIBC_2.4 sem_close F
GLIBC_2.4 sem_destroy F
GLIBC_2.4 sem_getvalue F

1
sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist

@ -52,7 +52,6 @@ GLIBC_2.0 pthread_setcancelstate F
GLIBC_2.0 pthread_setcanceltype F
GLIBC_2.0 pthread_setspecific F
GLIBC_2.0 pthread_testcancel F
GLIBC_2.0 raise F
GLIBC_2.0 sem_destroy F
GLIBC_2.0 sem_getvalue F
GLIBC_2.0 sem_init F

1
sysdeps/unix/sysv/linux/microblaze/be/libpthread.abilist

@ -138,7 +138,6 @@ GLIBC_2.18 pthread_testcancel F
GLIBC_2.18 pthread_timedjoin_np F
GLIBC_2.18 pthread_tryjoin_np F
GLIBC_2.18 pthread_yield F
GLIBC_2.18 raise F
GLIBC_2.18 sem_close F
GLIBC_2.18 sem_destroy F
GLIBC_2.18 sem_getvalue F

1
sysdeps/unix/sysv/linux/microblaze/le/libpthread.abilist

@ -138,7 +138,6 @@ GLIBC_2.18 pthread_testcancel F
GLIBC_2.18 pthread_timedjoin_np F
GLIBC_2.18 pthread_tryjoin_np F
GLIBC_2.18 pthread_yield F
GLIBC_2.18 raise F
GLIBC_2.18 sem_close F
GLIBC_2.18 sem_destroy F
GLIBC_2.18 sem_getvalue F

1
sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist

@ -52,7 +52,6 @@ GLIBC_2.0 pthread_setcancelstate F
GLIBC_2.0 pthread_setcanceltype F
GLIBC_2.0 pthread_setspecific F
GLIBC_2.0 pthread_testcancel F
GLIBC_2.0 raise F
GLIBC_2.0 sem_destroy F
GLIBC_2.0 sem_getvalue F
GLIBC_2.0 sem_init F

1
sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist

@ -52,7 +52,6 @@ GLIBC_2.0 pthread_setcancelstate F
GLIBC_2.0 pthread_setcanceltype F
GLIBC_2.0 pthread_setspecific F
GLIBC_2.0 pthread_testcancel F
GLIBC_2.0 raise F
GLIBC_2.0 sem_destroy F
GLIBC_2.0 sem_getvalue F
GLIBC_2.0 sem_init F

1
sysdeps/unix/sysv/linux/nios2/libpthread.abilist

@ -138,7 +138,6 @@ GLIBC_2.21 pthread_testcancel F
GLIBC_2.21 pthread_timedjoin_np F
GLIBC_2.21 pthread_tryjoin_np F
GLIBC_2.21 pthread_yield F
GLIBC_2.21 raise F
GLIBC_2.21 sem_close F
GLIBC_2.21 sem_destroy F
GLIBC_2.21 sem_getvalue F

1
sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist

@ -52,7 +52,6 @@ GLIBC_2.0 pthread_setcancelstate F
GLIBC_2.0 pthread_setcanceltype F
GLIBC_2.0 pthread_setspecific F
GLIBC_2.0 pthread_testcancel F
GLIBC_2.0 raise F
GLIBC_2.0 sem_destroy F
GLIBC_2.0 sem_getvalue F
GLIBC_2.0 sem_init F

1
sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist

@ -136,7 +136,6 @@ GLIBC_2.3 pthread_spin_trylock F
GLIBC_2.3 pthread_spin_unlock F
GLIBC_2.3 pthread_testcancel F
GLIBC_2.3 pthread_yield F
GLIBC_2.3 raise F
GLIBC_2.3 sem_close F
GLIBC_2.3 sem_destroy F
GLIBC_2.3 sem_getvalue F

1
sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist

@ -136,7 +136,6 @@ GLIBC_2.17 pthread_testcancel F
GLIBC_2.17 pthread_timedjoin_np F
GLIBC_2.17 pthread_tryjoin_np F
GLIBC_2.17 pthread_yield F
GLIBC_2.17 raise F
GLIBC_2.17 sem_close F
GLIBC_2.17 sem_destroy F
GLIBC_2.17 sem_getvalue F

20
sysdeps/unix/sysv/linux/pt-raise.c

@ -1,20 +0,0 @@
/* ISO C raise function for libpthread.
Copyright (C) 2002-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#include <sysdeps/unix/sysv/linux/raise.c>

1
sysdeps/unix/sysv/linux/riscv/rv32/libpthread.abilist

@ -155,7 +155,6 @@ GLIBC_2.33 pthread_testcancel F
GLIBC_2.33 pthread_timedjoin_np F
GLIBC_2.33 pthread_tryjoin_np F
GLIBC_2.33 pthread_yield F
GLIBC_2.33 raise F
GLIBC_2.33 sem_clockwait F
GLIBC_2.33 sem_close F
GLIBC_2.33 sem_destroy F

1
sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist

@ -137,7 +137,6 @@ GLIBC_2.27 pthread_testcancel F
GLIBC_2.27 pthread_timedjoin_np F
GLIBC_2.27 pthread_tryjoin_np F
GLIBC_2.27 pthread_yield F
GLIBC_2.27 raise F
GLIBC_2.27 sem_close F
GLIBC_2.27 sem_destroy F
GLIBC_2.27 sem_getvalue F

1
sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist

@ -52,7 +52,6 @@ GLIBC_2.0 pthread_setcancelstate F
GLIBC_2.0 pthread_setcanceltype F
GLIBC_2.0 pthread_setspecific F
GLIBC_2.0 pthread_testcancel F
GLIBC_2.0 raise F
GLIBC_2.0 sem_destroy F
GLIBC_2.0 sem_getvalue F
GLIBC_2.0 sem_init F

1
sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist

@ -118,7 +118,6 @@ GLIBC_2.2 pthread_spin_trylock F
GLIBC_2.2 pthread_spin_unlock F
GLIBC_2.2 pthread_testcancel F
GLIBC_2.2 pthread_yield F
GLIBC_2.2 raise F
GLIBC_2.2 sem_close F
GLIBC_2.2 sem_destroy F
GLIBC_2.2 sem_getvalue F

1
sysdeps/unix/sysv/linux/sh/be/libpthread.abilist

@ -116,7 +116,6 @@ GLIBC_2.2 pthread_spin_trylock F
GLIBC_2.2 pthread_spin_unlock F
GLIBC_2.2 pthread_testcancel F
GLIBC_2.2 pthread_yield F
GLIBC_2.2 raise F
GLIBC_2.2 sem_close F
GLIBC_2.2 sem_destroy F
GLIBC_2.2 sem_getvalue F

1
sysdeps/unix/sysv/linux/sh/le/libpthread.abilist

@ -116,7 +116,6 @@ GLIBC_2.2 pthread_spin_trylock F
GLIBC_2.2 pthread_spin_unlock F
GLIBC_2.2 pthread_testcancel F
GLIBC_2.2 pthread_yield F
GLIBC_2.2 raise F
GLIBC_2.2 sem_close F
GLIBC_2.2 sem_destroy F
GLIBC_2.2 sem_getvalue F

1
sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist

@ -52,7 +52,6 @@ GLIBC_2.0 pthread_setcancelstate F
GLIBC_2.0 pthread_setcanceltype F
GLIBC_2.0 pthread_setspecific F
GLIBC_2.0 pthread_testcancel F
GLIBC_2.0 raise F
GLIBC_2.0 sem_destroy F
GLIBC_2.0 sem_getvalue F
GLIBC_2.0 sem_init F

1
sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist

@ -116,7 +116,6 @@ GLIBC_2.2 pthread_spin_trylock F
GLIBC_2.2 pthread_spin_unlock F
GLIBC_2.2 pthread_testcancel F
GLIBC_2.2 pthread_yield F
GLIBC_2.2 raise F
GLIBC_2.2 sem_close F
GLIBC_2.2 sem_destroy F
GLIBC_2.2 sem_getvalue F

1
sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist

@ -116,7 +116,6 @@ GLIBC_2.2.5 pthread_spin_trylock F
GLIBC_2.2.5 pthread_spin_unlock F
GLIBC_2.2.5 pthread_testcancel F
GLIBC_2.2.5 pthread_yield F
GLIBC_2.2.5 raise F
GLIBC_2.2.5 sem_close F
GLIBC_2.2.5 sem_destroy F
GLIBC_2.2.5 sem_getvalue F

1
sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist

@ -136,7 +136,6 @@ GLIBC_2.16 pthread_testcancel F
GLIBC_2.16 pthread_timedjoin_np F
GLIBC_2.16 pthread_tryjoin_np F
GLIBC_2.16 pthread_yield F
GLIBC_2.16 raise F
GLIBC_2.16 sem_close F
GLIBC_2.16 sem_destroy F
GLIBC_2.16 sem_getvalue F

Loading…
Cancel
Save