mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-13 00:30:07 +00:00
nptl: Remove longjmp, siglongjmp from libpthread
The definitions in libc are sufficient, the forwarders are no longer needed. The symbols have been moved using scripts/move-symbol-to-libc.py. s390-linux-gnu and s390x-linux-gnu need a new version placeholder to keep the GLIBC_2.19 symbol version in libpthread. Tested on i386-linux-gnu, powerpc64le-linux-gnu, s390x-linux-gnu, x86_64-linux-gnu. Built with build-many-glibcs.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
1f2e5bfe48
commit
81dfc6694c
@ -102,7 +102,6 @@ libpthread-routines = \
|
||||
old_pthread_cond_wait \
|
||||
pt-cleanup \
|
||||
pt-interp \
|
||||
pt-longjmp \
|
||||
pthread_attr_getaffinity \
|
||||
pthread_attr_getguardsize \
|
||||
pthread_attr_getstack \
|
||||
|
@ -140,7 +140,6 @@ libpthread {
|
||||
flockfile;
|
||||
ftrylockfile;
|
||||
funlockfile;
|
||||
longjmp;
|
||||
pthread_atfork;
|
||||
pthread_cancel;
|
||||
pthread_cond_broadcast;
|
||||
@ -176,7 +175,6 @@ libpthread {
|
||||
sem_post;
|
||||
sem_trywait;
|
||||
sem_wait;
|
||||
siglongjmp;
|
||||
}
|
||||
|
||||
GLIBC_2.1 {
|
||||
|
@ -1,49 +0,0 @@
|
||||
/* ABI compatibility for 'longjmp' and 'siglongjmp' symbols in libpthread ABI.
|
||||
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 <setjmp.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
/* libpthread once had its own longjmp (and siglongjmp alias), though there
|
||||
was no apparent reason for it. There is no use in having a separate
|
||||
symbol in libpthread, but the historical ABI requires it. For static
|
||||
linking, there is no need to provide anything here--the libc version
|
||||
will be linked in. For shared library ABI compatibility, there must be
|
||||
longjmp and siglongjmp symbols in libpthread.so.
|
||||
|
||||
With an IFUNC resolver, it would be possible to avoid the indirection,
|
||||
but the IFUNC resolver might run before the __libc_longjmp symbol has
|
||||
been relocated, in which case the IFUNC resolver would not be able to
|
||||
provide the correct address. */
|
||||
|
||||
#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_22)
|
||||
|
||||
static void __attribute__ ((noreturn, used))
|
||||
longjmp_compat (jmp_buf env, int val)
|
||||
{
|
||||
__libc_longjmp (env, val);
|
||||
}
|
||||
|
||||
strong_alias (longjmp_compat, longjmp_alias)
|
||||
compat_symbol (libpthread, longjmp_alias, longjmp, GLIBC_2_0);
|
||||
|
||||
strong_alias (longjmp_alias, siglongjmp_alias)
|
||||
compat_symbol (libpthread, siglongjmp_alias, siglongjmp, GLIBC_2_0);
|
||||
|
||||
#endif
|
@ -31,7 +31,6 @@ GLIBC_2.17 __res_state F
|
||||
GLIBC_2.17 flockfile F
|
||||
GLIBC_2.17 ftrylockfile F
|
||||
GLIBC_2.17 funlockfile F
|
||||
GLIBC_2.17 longjmp F
|
||||
GLIBC_2.17 pthread_attr_getaffinity_np F
|
||||
GLIBC_2.17 pthread_attr_getguardsize F
|
||||
GLIBC_2.17 pthread_attr_getstack F
|
||||
@ -135,7 +134,6 @@ GLIBC_2.17 sem_timedwait F
|
||||
GLIBC_2.17 sem_trywait F
|
||||
GLIBC_2.17 sem_unlink F
|
||||
GLIBC_2.17 sem_wait F
|
||||
GLIBC_2.17 siglongjmp F
|
||||
GLIBC_2.18 pthread_getattr_default_np F
|
||||
GLIBC_2.18 pthread_setattr_default_np F
|
||||
GLIBC_2.28 call_once F
|
||||
|
@ -18,7 +18,6 @@ GLIBC_2.0 __pthread_setspecific F
|
||||
GLIBC_2.0 flockfile F
|
||||
GLIBC_2.0 ftrylockfile F
|
||||
GLIBC_2.0 funlockfile F
|
||||
GLIBC_2.0 longjmp F
|
||||
GLIBC_2.0 pthread_atfork F
|
||||
GLIBC_2.0 pthread_cancel F
|
||||
GLIBC_2.0 pthread_cond_broadcast F
|
||||
@ -53,7 +52,6 @@ GLIBC_2.0 sem_init F
|
||||
GLIBC_2.0 sem_post F
|
||||
GLIBC_2.0 sem_trywait F
|
||||
GLIBC_2.0 sem_wait F
|
||||
GLIBC_2.0 siglongjmp F
|
||||
GLIBC_2.1 pthread_attr_getguardsize F
|
||||
GLIBC_2.1 pthread_attr_getstackaddr F
|
||||
GLIBC_2.1 pthread_attr_getstacksize F
|
||||
|
@ -65,7 +65,6 @@ GLIBC_2.4 __res_state F
|
||||
GLIBC_2.4 flockfile F
|
||||
GLIBC_2.4 ftrylockfile F
|
||||
GLIBC_2.4 funlockfile F
|
||||
GLIBC_2.4 longjmp F
|
||||
GLIBC_2.4 pthread_attr_getaffinity_np F
|
||||
GLIBC_2.4 pthread_attr_getguardsize F
|
||||
GLIBC_2.4 pthread_attr_getstack F
|
||||
@ -164,4 +163,3 @@ GLIBC_2.4 sem_timedwait F
|
||||
GLIBC_2.4 sem_trywait F
|
||||
GLIBC_2.4 sem_unlink F
|
||||
GLIBC_2.4 sem_wait F
|
||||
GLIBC_2.4 siglongjmp F
|
||||
|
@ -65,7 +65,6 @@ GLIBC_2.4 __res_state F
|
||||
GLIBC_2.4 flockfile F
|
||||
GLIBC_2.4 ftrylockfile F
|
||||
GLIBC_2.4 funlockfile F
|
||||
GLIBC_2.4 longjmp F
|
||||
GLIBC_2.4 pthread_attr_getaffinity_np F
|
||||
GLIBC_2.4 pthread_attr_getguardsize F
|
||||
GLIBC_2.4 pthread_attr_getstack F
|
||||
@ -164,4 +163,3 @@ GLIBC_2.4 sem_timedwait F
|
||||
GLIBC_2.4 sem_trywait F
|
||||
GLIBC_2.4 sem_unlink F
|
||||
GLIBC_2.4 sem_wait F
|
||||
GLIBC_2.4 siglongjmp F
|
||||
|
@ -33,7 +33,6 @@ GLIBC_2.2 __res_state F
|
||||
GLIBC_2.2 flockfile F
|
||||
GLIBC_2.2 ftrylockfile F
|
||||
GLIBC_2.2 funlockfile F
|
||||
GLIBC_2.2 longjmp F
|
||||
GLIBC_2.2 pthread_atfork F
|
||||
GLIBC_2.2 pthread_attr_getguardsize F
|
||||
GLIBC_2.2 pthread_attr_getstack F
|
||||
@ -117,7 +116,6 @@ GLIBC_2.2 sem_timedwait F
|
||||
GLIBC_2.2 sem_trywait F
|
||||
GLIBC_2.2 sem_unlink F
|
||||
GLIBC_2.2 sem_wait F
|
||||
GLIBC_2.2 siglongjmp F
|
||||
GLIBC_2.2.3 __libpthread_version_placeholder F
|
||||
GLIBC_2.2.6 __libpthread_version_placeholder F
|
||||
GLIBC_2.28 call_once F
|
||||
|
@ -18,7 +18,6 @@ GLIBC_2.0 __pthread_setspecific F
|
||||
GLIBC_2.0 flockfile F
|
||||
GLIBC_2.0 ftrylockfile F
|
||||
GLIBC_2.0 funlockfile F
|
||||
GLIBC_2.0 longjmp F
|
||||
GLIBC_2.0 pthread_atfork F
|
||||
GLIBC_2.0 pthread_cancel F
|
||||
GLIBC_2.0 pthread_cond_broadcast F
|
||||
@ -53,7 +52,6 @@ GLIBC_2.0 sem_init F
|
||||
GLIBC_2.0 sem_post F
|
||||
GLIBC_2.0 sem_trywait F
|
||||
GLIBC_2.0 sem_wait F
|
||||
GLIBC_2.0 siglongjmp F
|
||||
GLIBC_2.1 pthread_attr_getguardsize F
|
||||
GLIBC_2.1 pthread_attr_getstackaddr F
|
||||
GLIBC_2.1 pthread_attr_getstacksize F
|
||||
|
@ -33,7 +33,6 @@ GLIBC_2.2 __res_state F
|
||||
GLIBC_2.2 flockfile F
|
||||
GLIBC_2.2 ftrylockfile F
|
||||
GLIBC_2.2 funlockfile F
|
||||
GLIBC_2.2 longjmp F
|
||||
GLIBC_2.2 pthread_atfork F
|
||||
GLIBC_2.2 pthread_attr_getguardsize F
|
||||
GLIBC_2.2 pthread_attr_getstack F
|
||||
@ -117,7 +116,6 @@ GLIBC_2.2 sem_timedwait F
|
||||
GLIBC_2.2 sem_trywait F
|
||||
GLIBC_2.2 sem_unlink F
|
||||
GLIBC_2.2 sem_wait F
|
||||
GLIBC_2.2 siglongjmp F
|
||||
GLIBC_2.2.3 __libpthread_version_placeholder F
|
||||
GLIBC_2.2.6 __libpthread_version_placeholder F
|
||||
GLIBC_2.28 call_once F
|
||||
|
@ -65,7 +65,6 @@ GLIBC_2.4 __res_state F
|
||||
GLIBC_2.4 flockfile F
|
||||
GLIBC_2.4 ftrylockfile F
|
||||
GLIBC_2.4 funlockfile F
|
||||
GLIBC_2.4 longjmp F
|
||||
GLIBC_2.4 pthread_attr_getaffinity_np F
|
||||
GLIBC_2.4 pthread_attr_getguardsize F
|
||||
GLIBC_2.4 pthread_attr_getstack F
|
||||
@ -164,4 +163,3 @@ GLIBC_2.4 sem_timedwait F
|
||||
GLIBC_2.4 sem_trywait F
|
||||
GLIBC_2.4 sem_unlink F
|
||||
GLIBC_2.4 sem_wait F
|
||||
GLIBC_2.4 siglongjmp F
|
||||
|
@ -18,7 +18,6 @@ GLIBC_2.0 __pthread_setspecific F
|
||||
GLIBC_2.0 flockfile F
|
||||
GLIBC_2.0 ftrylockfile F
|
||||
GLIBC_2.0 funlockfile F
|
||||
GLIBC_2.0 longjmp F
|
||||
GLIBC_2.0 pthread_atfork F
|
||||
GLIBC_2.0 pthread_cancel F
|
||||
GLIBC_2.0 pthread_cond_broadcast F
|
||||
@ -53,7 +52,6 @@ GLIBC_2.0 sem_init F
|
||||
GLIBC_2.0 sem_post F
|
||||
GLIBC_2.0 sem_trywait F
|
||||
GLIBC_2.0 sem_wait F
|
||||
GLIBC_2.0 siglongjmp F
|
||||
GLIBC_2.1 pthread_attr_getguardsize F
|
||||
GLIBC_2.1 pthread_attr_getstackaddr F
|
||||
GLIBC_2.1 pthread_attr_getstacksize F
|
||||
|
@ -31,7 +31,6 @@ GLIBC_2.18 __res_state F
|
||||
GLIBC_2.18 flockfile F
|
||||
GLIBC_2.18 ftrylockfile F
|
||||
GLIBC_2.18 funlockfile F
|
||||
GLIBC_2.18 longjmp F
|
||||
GLIBC_2.18 pthread_attr_getaffinity_np F
|
||||
GLIBC_2.18 pthread_attr_getguardsize F
|
||||
GLIBC_2.18 pthread_attr_getstack F
|
||||
@ -137,7 +136,6 @@ GLIBC_2.18 sem_timedwait F
|
||||
GLIBC_2.18 sem_trywait F
|
||||
GLIBC_2.18 sem_unlink F
|
||||
GLIBC_2.18 sem_wait F
|
||||
GLIBC_2.18 siglongjmp F
|
||||
GLIBC_2.28 call_once F
|
||||
GLIBC_2.28 cnd_broadcast F
|
||||
GLIBC_2.28 cnd_destroy F
|
||||
|
@ -31,7 +31,6 @@ GLIBC_2.18 __res_state F
|
||||
GLIBC_2.18 flockfile F
|
||||
GLIBC_2.18 ftrylockfile F
|
||||
GLIBC_2.18 funlockfile F
|
||||
GLIBC_2.18 longjmp F
|
||||
GLIBC_2.18 pthread_attr_getaffinity_np F
|
||||
GLIBC_2.18 pthread_attr_getguardsize F
|
||||
GLIBC_2.18 pthread_attr_getstack F
|
||||
@ -137,7 +136,6 @@ GLIBC_2.18 sem_timedwait F
|
||||
GLIBC_2.18 sem_trywait F
|
||||
GLIBC_2.18 sem_unlink F
|
||||
GLIBC_2.18 sem_wait F
|
||||
GLIBC_2.18 siglongjmp F
|
||||
GLIBC_2.28 call_once F
|
||||
GLIBC_2.28 cnd_broadcast F
|
||||
GLIBC_2.28 cnd_destroy F
|
||||
|
@ -18,7 +18,6 @@ GLIBC_2.0 __pthread_setspecific F
|
||||
GLIBC_2.0 flockfile F
|
||||
GLIBC_2.0 ftrylockfile F
|
||||
GLIBC_2.0 funlockfile F
|
||||
GLIBC_2.0 longjmp F
|
||||
GLIBC_2.0 pthread_atfork F
|
||||
GLIBC_2.0 pthread_cancel F
|
||||
GLIBC_2.0 pthread_cond_broadcast F
|
||||
@ -53,7 +52,6 @@ GLIBC_2.0 sem_init F
|
||||
GLIBC_2.0 sem_post F
|
||||
GLIBC_2.0 sem_trywait F
|
||||
GLIBC_2.0 sem_wait F
|
||||
GLIBC_2.0 siglongjmp F
|
||||
GLIBC_2.11 pthread_sigqueue F
|
||||
GLIBC_2.12 pthread_getname_np F
|
||||
GLIBC_2.12 pthread_mutexattr_getrobust F
|
||||
|
@ -18,7 +18,6 @@ GLIBC_2.0 __pthread_setspecific F
|
||||
GLIBC_2.0 flockfile F
|
||||
GLIBC_2.0 ftrylockfile F
|
||||
GLIBC_2.0 funlockfile F
|
||||
GLIBC_2.0 longjmp F
|
||||
GLIBC_2.0 pthread_atfork F
|
||||
GLIBC_2.0 pthread_cancel F
|
||||
GLIBC_2.0 pthread_cond_broadcast F
|
||||
@ -53,7 +52,6 @@ GLIBC_2.0 sem_init F
|
||||
GLIBC_2.0 sem_post F
|
||||
GLIBC_2.0 sem_trywait F
|
||||
GLIBC_2.0 sem_wait F
|
||||
GLIBC_2.0 siglongjmp F
|
||||
GLIBC_2.11 pthread_sigqueue F
|
||||
GLIBC_2.12 pthread_getname_np F
|
||||
GLIBC_2.12 pthread_mutexattr_getrobust F
|
||||
|
@ -31,7 +31,6 @@ GLIBC_2.21 __res_state F
|
||||
GLIBC_2.21 flockfile F
|
||||
GLIBC_2.21 ftrylockfile F
|
||||
GLIBC_2.21 funlockfile F
|
||||
GLIBC_2.21 longjmp F
|
||||
GLIBC_2.21 pthread_attr_getaffinity_np F
|
||||
GLIBC_2.21 pthread_attr_getguardsize F
|
||||
GLIBC_2.21 pthread_attr_getstack F
|
||||
@ -137,7 +136,6 @@ GLIBC_2.21 sem_timedwait F
|
||||
GLIBC_2.21 sem_trywait F
|
||||
GLIBC_2.21 sem_unlink F
|
||||
GLIBC_2.21 sem_wait F
|
||||
GLIBC_2.21 siglongjmp F
|
||||
GLIBC_2.28 call_once F
|
||||
GLIBC_2.28 cnd_broadcast F
|
||||
GLIBC_2.28 cnd_destroy F
|
||||
|
@ -18,7 +18,6 @@ GLIBC_2.0 __pthread_setspecific F
|
||||
GLIBC_2.0 flockfile F
|
||||
GLIBC_2.0 ftrylockfile F
|
||||
GLIBC_2.0 funlockfile F
|
||||
GLIBC_2.0 longjmp F
|
||||
GLIBC_2.0 pthread_atfork F
|
||||
GLIBC_2.0 pthread_cancel F
|
||||
GLIBC_2.0 pthread_cond_broadcast F
|
||||
@ -53,7 +52,6 @@ GLIBC_2.0 sem_init F
|
||||
GLIBC_2.0 sem_post F
|
||||
GLIBC_2.0 sem_trywait F
|
||||
GLIBC_2.0 sem_wait F
|
||||
GLIBC_2.0 siglongjmp F
|
||||
GLIBC_2.1 pthread_attr_getguardsize F
|
||||
GLIBC_2.1 pthread_attr_getstackaddr F
|
||||
GLIBC_2.1 pthread_attr_getstacksize F
|
||||
@ -165,11 +163,9 @@ GLIBC_2.3.3 pthread_condattr_setclock F
|
||||
GLIBC_2.3.3 pthread_setaffinity_np F
|
||||
GLIBC_2.3.3 pthread_timedjoin_np F
|
||||
GLIBC_2.3.3 pthread_tryjoin_np F
|
||||
GLIBC_2.3.4 longjmp F
|
||||
GLIBC_2.3.4 pthread_attr_getaffinity_np F
|
||||
GLIBC_2.3.4 pthread_setaffinity_np F
|
||||
GLIBC_2.3.4 pthread_setschedprio F
|
||||
GLIBC_2.3.4 siglongjmp F
|
||||
GLIBC_2.30 pthread_cond_clockwait F
|
||||
GLIBC_2.30 pthread_mutex_clocklock F
|
||||
GLIBC_2.30 pthread_rwlock_clockrdlock F
|
||||
|
@ -54,7 +54,6 @@ GLIBC_2.3 __res_state F
|
||||
GLIBC_2.3 flockfile F
|
||||
GLIBC_2.3 ftrylockfile F
|
||||
GLIBC_2.3 funlockfile F
|
||||
GLIBC_2.3 longjmp F
|
||||
GLIBC_2.3 pthread_attr_getguardsize F
|
||||
GLIBC_2.3 pthread_attr_getstack F
|
||||
GLIBC_2.3 pthread_attr_getstackaddr F
|
||||
@ -137,7 +136,6 @@ GLIBC_2.3 sem_timedwait F
|
||||
GLIBC_2.3 sem_trywait F
|
||||
GLIBC_2.3 sem_unlink F
|
||||
GLIBC_2.3 sem_wait F
|
||||
GLIBC_2.3 siglongjmp F
|
||||
GLIBC_2.3.2 pthread_cond_broadcast F
|
||||
GLIBC_2.3.2 pthread_cond_signal F
|
||||
GLIBC_2.3.2 pthread_cond_timedwait F
|
||||
@ -154,11 +152,9 @@ GLIBC_2.3.3 pthread_condattr_setclock F
|
||||
GLIBC_2.3.3 pthread_setaffinity_np F
|
||||
GLIBC_2.3.3 pthread_timedjoin_np F
|
||||
GLIBC_2.3.3 pthread_tryjoin_np F
|
||||
GLIBC_2.3.4 longjmp F
|
||||
GLIBC_2.3.4 pthread_attr_getaffinity_np F
|
||||
GLIBC_2.3.4 pthread_setaffinity_np F
|
||||
GLIBC_2.3.4 pthread_setschedprio F
|
||||
GLIBC_2.3.4 siglongjmp F
|
||||
GLIBC_2.30 pthread_cond_clockwait F
|
||||
GLIBC_2.30 pthread_mutex_clocklock F
|
||||
GLIBC_2.30 pthread_rwlock_clockrdlock F
|
||||
|
@ -31,7 +31,6 @@ GLIBC_2.17 __res_state F
|
||||
GLIBC_2.17 flockfile F
|
||||
GLIBC_2.17 ftrylockfile F
|
||||
GLIBC_2.17 funlockfile F
|
||||
GLIBC_2.17 longjmp F
|
||||
GLIBC_2.17 pthread_attr_getaffinity_np F
|
||||
GLIBC_2.17 pthread_attr_getguardsize F
|
||||
GLIBC_2.17 pthread_attr_getstack F
|
||||
@ -135,7 +134,6 @@ GLIBC_2.17 sem_timedwait F
|
||||
GLIBC_2.17 sem_trywait F
|
||||
GLIBC_2.17 sem_unlink F
|
||||
GLIBC_2.17 sem_wait F
|
||||
GLIBC_2.17 siglongjmp F
|
||||
GLIBC_2.18 pthread_getattr_default_np F
|
||||
GLIBC_2.18 pthread_setattr_default_np F
|
||||
GLIBC_2.28 call_once F
|
||||
|
@ -1,61 +0,0 @@
|
||||
/* 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 <setjmp.h>
|
||||
#include <stdlib.h>
|
||||
#include <bits/wordsize.h>
|
||||
#include "pthreadP.h"
|
||||
#include <shlib-compat.h>
|
||||
#if defined SHARED && SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_3_4)
|
||||
|
||||
/* These functions are not declared anywhere since they shouldn't be
|
||||
used at another place but here. */
|
||||
extern void __novmx__libc_siglongjmp (sigjmp_buf env, int val)
|
||||
__attribute__ ((noreturn));
|
||||
extern void __novmx__libc_longjmp (sigjmp_buf env, int val)
|
||||
__attribute__ ((noreturn));
|
||||
|
||||
|
||||
void __novmx_siglongjmp (sigjmp_buf env, int val)
|
||||
{
|
||||
__novmx__libc_siglongjmp (env, val);
|
||||
}
|
||||
|
||||
void __novmx_longjmp (jmp_buf env, int val)
|
||||
{
|
||||
__novmx__libc_longjmp (env, val);
|
||||
}
|
||||
|
||||
compat_symbol (libpthread, __novmx_longjmp, longjmp, GLIBC_2_0);
|
||||
compat_symbol (libpthread, __novmx_siglongjmp, siglongjmp, GLIBC_2_0);
|
||||
#endif /* defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)) */
|
||||
|
||||
void
|
||||
__vmx_longjmp (jmp_buf env, int val)
|
||||
{
|
||||
__libc_longjmp (env, val);
|
||||
}
|
||||
|
||||
void
|
||||
__vmx_siglongjmp (jmp_buf env, int val)
|
||||
{
|
||||
__libc_siglongjmp (env, val);
|
||||
}
|
||||
|
||||
versioned_symbol (libpthread, __vmx_longjmp, longjmp, GLIBC_2_3_4);
|
||||
versioned_symbol (libpthread, __vmx_siglongjmp, siglongjmp, GLIBC_2_3_4);
|
@ -11,6 +11,6 @@ libc {
|
||||
|
||||
libpthread {
|
||||
GLIBC_2.19 {
|
||||
longjmp; siglongjmp;
|
||||
__libpthread_version_placeholder;
|
||||
}
|
||||
}
|
||||
|
25
sysdeps/unix/sysv/linux/s390/libpthread-compat.c
Normal file
25
sysdeps/unix/sysv/linux/s390/libpthread-compat.c
Normal file
@ -0,0 +1,25 @@
|
||||
/* Placeholder definitions to pull in removed symbol versions. s390 version.
|
||||
Copyright (C) 2019-2021 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
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 <nptl/libpthread-compat.c>
|
||||
|
||||
/* GLIBC_2.19 was used by a longjmp compatibility symbol. */
|
||||
#if (SHLIB_COMPAT (libpthread, GLIBC_2_19, GLIBC_2_20))
|
||||
compat_symbol (libpthread, __libpthread_version_placeholder_1,
|
||||
__libpthread_version_placeholder, GLIBC_2_19);
|
||||
#endif
|
@ -1,33 +0,0 @@
|
||||
/* Copyright (C) 2014-2021 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
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/>.
|
||||
|
||||
Versioned copy of nptl/pt-longjmp.c modified for versioning
|
||||
the reverted jmpbuf extension. */
|
||||
|
||||
#include <shlib-compat.h>
|
||||
|
||||
#include <nptl/pt-longjmp.c>
|
||||
|
||||
#if SHLIB_COMPAT (libpthread, GLIBC_2_19, GLIBC_2_20)
|
||||
/* In glibc release 2.19 new versions of longjmp-functions were introduced,
|
||||
but were reverted before 2.20. Thus both versions are the same function. */
|
||||
|
||||
strong_alias (longjmp_alias, __v2longjmp)
|
||||
compat_symbol (libpthread, __v2longjmp, longjmp, GLIBC_2_19);
|
||||
strong_alias (siglongjmp_alias, __v2siglongjmp)
|
||||
compat_symbol (libpthread, __v2siglongjmp, siglongjmp, GLIBC_2_19);
|
||||
#endif /* SHLIB_COMPAT (libpthread, GLIBC_2_19, GLIBC_2_20)) */
|
@ -18,7 +18,6 @@ GLIBC_2.0 __pthread_setspecific F
|
||||
GLIBC_2.0 flockfile F
|
||||
GLIBC_2.0 ftrylockfile F
|
||||
GLIBC_2.0 funlockfile F
|
||||
GLIBC_2.0 longjmp F
|
||||
GLIBC_2.0 pthread_atfork F
|
||||
GLIBC_2.0 pthread_cancel F
|
||||
GLIBC_2.0 pthread_cond_broadcast F
|
||||
@ -53,7 +52,6 @@ GLIBC_2.0 sem_init F
|
||||
GLIBC_2.0 sem_post F
|
||||
GLIBC_2.0 sem_trywait F
|
||||
GLIBC_2.0 sem_wait F
|
||||
GLIBC_2.0 siglongjmp F
|
||||
GLIBC_2.1 pthread_attr_getguardsize F
|
||||
GLIBC_2.1 pthread_attr_getstackaddr F
|
||||
GLIBC_2.1 pthread_attr_getstacksize F
|
||||
@ -95,8 +93,7 @@ GLIBC_2.12 pthread_mutexattr_setrobust F
|
||||
GLIBC_2.12 pthread_setname_np F
|
||||
GLIBC_2.18 pthread_getattr_default_np F
|
||||
GLIBC_2.18 pthread_setattr_default_np F
|
||||
GLIBC_2.19 longjmp F
|
||||
GLIBC_2.19 siglongjmp F
|
||||
GLIBC_2.19 __libpthread_version_placeholder F
|
||||
GLIBC_2.2 __pthread_rwlock_destroy F
|
||||
GLIBC_2.2 __pthread_rwlock_init F
|
||||
GLIBC_2.2 __pthread_rwlock_rdlock F
|
||||
|
@ -5,8 +5,7 @@ GLIBC_2.12 pthread_mutexattr_setrobust F
|
||||
GLIBC_2.12 pthread_setname_np F
|
||||
GLIBC_2.18 pthread_getattr_default_np F
|
||||
GLIBC_2.18 pthread_setattr_default_np F
|
||||
GLIBC_2.19 longjmp F
|
||||
GLIBC_2.19 siglongjmp F
|
||||
GLIBC_2.19 __libpthread_version_placeholder F
|
||||
GLIBC_2.2 _IO_flockfile F
|
||||
GLIBC_2.2 _IO_ftrylockfile F
|
||||
GLIBC_2.2 _IO_funlockfile F
|
||||
@ -35,7 +34,6 @@ GLIBC_2.2 __res_state F
|
||||
GLIBC_2.2 flockfile F
|
||||
GLIBC_2.2 ftrylockfile F
|
||||
GLIBC_2.2 funlockfile F
|
||||
GLIBC_2.2 longjmp F
|
||||
GLIBC_2.2 pthread_atfork F
|
||||
GLIBC_2.2 pthread_attr_getguardsize F
|
||||
GLIBC_2.2 pthread_attr_getstack F
|
||||
@ -119,7 +117,6 @@ GLIBC_2.2 sem_timedwait F
|
||||
GLIBC_2.2 sem_trywait F
|
||||
GLIBC_2.2 sem_unlink F
|
||||
GLIBC_2.2 sem_wait F
|
||||
GLIBC_2.2 siglongjmp F
|
||||
GLIBC_2.2.3 __libpthread_version_placeholder F
|
||||
GLIBC_2.2.6 __libpthread_version_placeholder F
|
||||
GLIBC_2.28 call_once F
|
||||
|
@ -33,7 +33,6 @@ GLIBC_2.2 __res_state F
|
||||
GLIBC_2.2 flockfile F
|
||||
GLIBC_2.2 ftrylockfile F
|
||||
GLIBC_2.2 funlockfile F
|
||||
GLIBC_2.2 longjmp F
|
||||
GLIBC_2.2 pthread_atfork F
|
||||
GLIBC_2.2 pthread_attr_getguardsize F
|
||||
GLIBC_2.2 pthread_attr_getstack F
|
||||
@ -117,7 +116,6 @@ GLIBC_2.2 sem_timedwait F
|
||||
GLIBC_2.2 sem_trywait F
|
||||
GLIBC_2.2 sem_unlink F
|
||||
GLIBC_2.2 sem_wait F
|
||||
GLIBC_2.2 siglongjmp F
|
||||
GLIBC_2.2.3 __libpthread_version_placeholder F
|
||||
GLIBC_2.2.6 __libpthread_version_placeholder F
|
||||
GLIBC_2.28 call_once F
|
||||
|
@ -33,7 +33,6 @@ GLIBC_2.2 __res_state F
|
||||
GLIBC_2.2 flockfile F
|
||||
GLIBC_2.2 ftrylockfile F
|
||||
GLIBC_2.2 funlockfile F
|
||||
GLIBC_2.2 longjmp F
|
||||
GLIBC_2.2 pthread_atfork F
|
||||
GLIBC_2.2 pthread_attr_getguardsize F
|
||||
GLIBC_2.2 pthread_attr_getstack F
|
||||
@ -117,7 +116,6 @@ GLIBC_2.2 sem_timedwait F
|
||||
GLIBC_2.2 sem_trywait F
|
||||
GLIBC_2.2 sem_unlink F
|
||||
GLIBC_2.2 sem_wait F
|
||||
GLIBC_2.2 siglongjmp F
|
||||
GLIBC_2.2.3 __libpthread_version_placeholder F
|
||||
GLIBC_2.2.6 __libpthread_version_placeholder F
|
||||
GLIBC_2.28 call_once F
|
||||
|
@ -18,7 +18,6 @@ GLIBC_2.0 __pthread_setspecific F
|
||||
GLIBC_2.0 flockfile F
|
||||
GLIBC_2.0 ftrylockfile F
|
||||
GLIBC_2.0 funlockfile F
|
||||
GLIBC_2.0 longjmp F
|
||||
GLIBC_2.0 pthread_atfork F
|
||||
GLIBC_2.0 pthread_cancel F
|
||||
GLIBC_2.0 pthread_cond_broadcast F
|
||||
@ -53,7 +52,6 @@ GLIBC_2.0 sem_init F
|
||||
GLIBC_2.0 sem_post F
|
||||
GLIBC_2.0 sem_trywait F
|
||||
GLIBC_2.0 sem_wait F
|
||||
GLIBC_2.0 siglongjmp F
|
||||
GLIBC_2.1 pthread_attr_getguardsize F
|
||||
GLIBC_2.1 pthread_attr_getstackaddr F
|
||||
GLIBC_2.1 pthread_attr_getstacksize F
|
||||
|
@ -33,7 +33,6 @@ GLIBC_2.2 __res_state F
|
||||
GLIBC_2.2 flockfile F
|
||||
GLIBC_2.2 ftrylockfile F
|
||||
GLIBC_2.2 funlockfile F
|
||||
GLIBC_2.2 longjmp F
|
||||
GLIBC_2.2 pthread_atfork F
|
||||
GLIBC_2.2 pthread_attr_getguardsize F
|
||||
GLIBC_2.2 pthread_attr_getstack F
|
||||
@ -117,7 +116,6 @@ GLIBC_2.2 sem_timedwait F
|
||||
GLIBC_2.2 sem_trywait F
|
||||
GLIBC_2.2 sem_unlink F
|
||||
GLIBC_2.2 sem_wait F
|
||||
GLIBC_2.2 siglongjmp F
|
||||
GLIBC_2.2.3 __libpthread_version_placeholder F
|
||||
GLIBC_2.2.6 __libpthread_version_placeholder F
|
||||
GLIBC_2.28 call_once F
|
||||
|
@ -33,7 +33,6 @@ GLIBC_2.2.5 __res_state F
|
||||
GLIBC_2.2.5 flockfile F
|
||||
GLIBC_2.2.5 ftrylockfile F
|
||||
GLIBC_2.2.5 funlockfile F
|
||||
GLIBC_2.2.5 longjmp F
|
||||
GLIBC_2.2.5 pthread_atfork F
|
||||
GLIBC_2.2.5 pthread_attr_getguardsize F
|
||||
GLIBC_2.2.5 pthread_attr_getstack F
|
||||
@ -117,7 +116,6 @@ GLIBC_2.2.5 sem_timedwait F
|
||||
GLIBC_2.2.5 sem_trywait F
|
||||
GLIBC_2.2.5 sem_unlink F
|
||||
GLIBC_2.2.5 sem_wait F
|
||||
GLIBC_2.2.5 siglongjmp F
|
||||
GLIBC_2.2.6 __libpthread_version_placeholder F
|
||||
GLIBC_2.28 call_once F
|
||||
GLIBC_2.28 cnd_broadcast F
|
||||
|
@ -31,7 +31,6 @@ GLIBC_2.16 __res_state F
|
||||
GLIBC_2.16 flockfile F
|
||||
GLIBC_2.16 ftrylockfile F
|
||||
GLIBC_2.16 funlockfile F
|
||||
GLIBC_2.16 longjmp F
|
||||
GLIBC_2.16 pthread_attr_getaffinity_np F
|
||||
GLIBC_2.16 pthread_attr_getguardsize F
|
||||
GLIBC_2.16 pthread_attr_getstack F
|
||||
@ -135,7 +134,6 @@ GLIBC_2.16 sem_timedwait F
|
||||
GLIBC_2.16 sem_trywait F
|
||||
GLIBC_2.16 sem_unlink F
|
||||
GLIBC_2.16 sem_wait F
|
||||
GLIBC_2.16 siglongjmp F
|
||||
GLIBC_2.18 pthread_getattr_default_np F
|
||||
GLIBC_2.18 pthread_setattr_default_np F
|
||||
GLIBC_2.28 call_once F
|
||||
|
@ -1,71 +0,0 @@
|
||||
/* ABI compatibility for 'longjmp' and 'siglongjmp' symbols in libpthread ABI.
|
||||
X86 version.
|
||||
Copyright (C) 1918-2021 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
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 <pthreadP.h>
|
||||
#include <jmp_buf-ssp.h>
|
||||
|
||||
#ifdef __x86_64__
|
||||
# define SHADOW_STACK_POINTER_SIZE 8
|
||||
#else
|
||||
# define SHADOW_STACK_POINTER_SIZE 4
|
||||
#endif
|
||||
|
||||
/* Assert that the priv field in struct pthread_unwind_buf has space
|
||||
to store shadow stack pointer. */
|
||||
_Static_assert ((offsetof (struct pthread_unwind_buf, priv)
|
||||
<= SHADOW_STACK_POINTER_OFFSET)
|
||||
&& ((offsetof (struct pthread_unwind_buf, priv)
|
||||
+ sizeof (((struct pthread_unwind_buf *) 0)->priv))
|
||||
>= (SHADOW_STACK_POINTER_OFFSET
|
||||
+ SHADOW_STACK_POINTER_SIZE)),
|
||||
"Shadow stack pointer is not within private storage "
|
||||
"of pthread_unwind_buf.");
|
||||
|
||||
#include <shlib-compat.h>
|
||||
|
||||
/* libpthread once had its own longjmp (and siglongjmp alias), though there
|
||||
was no apparent reason for it. There is no use in having a separate
|
||||
symbol in libpthread, but the historical ABI requires it. For static
|
||||
linking, there is no need to provide anything here--the libc version
|
||||
will be linked in. For shared library ABI compatibility, there must be
|
||||
longjmp and siglongjmp symbols in libpthread.so.
|
||||
|
||||
With an IFUNC resolver, it would be possible to avoid the indirection,
|
||||
but the IFUNC resolver might run before the __libc_longjmp symbol has
|
||||
been relocated, in which case the IFUNC resolver would not be able to
|
||||
provide the correct address. */
|
||||
|
||||
#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_22)
|
||||
|
||||
static void __attribute__ ((noreturn, used))
|
||||
longjmp_compat (jmp_buf env, int val)
|
||||
{
|
||||
/* NB: We call __libc_siglongjmp, instead of __libc_longjmp, since
|
||||
__libc_longjmp is a private interface for cancellation which
|
||||
doesn't restore shadow stack register. */
|
||||
__libc_siglongjmp (env, val);
|
||||
}
|
||||
|
||||
strong_alias (longjmp_compat, longjmp_alias)
|
||||
compat_symbol (libpthread, longjmp_alias, longjmp, GLIBC_2_0);
|
||||
|
||||
strong_alias (longjmp_alias, siglongjmp_alias)
|
||||
compat_symbol (libpthread, siglongjmp_alias, siglongjmp, GLIBC_2_0);
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user