diff options
author | Stefan Liebler <stli@linux.vnet.ibm.com> | 2016-10-07 09:56:48 +0200 |
---|---|---|
committer | Stefan Liebler <stli@linux.vnet.ibm.com> | 2016-10-07 10:12:48 +0200 |
commit | 314ba75e4a26f7147c757a10b07a62ff113409aa (patch) | |
tree | 9b327c5b4c305cd198d1c9dda45777f6d3bfa4bd /nptl | |
parent | 051f8be7c9466c7e53bf1f3a9d5a83c53a7ea815 (diff) | |
download | glibc-314ba75e4a26f7147c757a10b07a62ff113409aa.zip glibc-314ba75e4a26f7147c757a10b07a62ff113409aa.tar.gz glibc-314ba75e4a26f7147c757a10b07a62ff113409aa.tar.bz2 |
Use libc_ifunc macro for siglongjmp, longjmp in libpthread.
This patch uses the libc_ifunc macro to create already existing ifunc functions
longjmp_ifunc, siglongjmp_ifunc if HAVE_IFUNC is defined.
The s390 pt-longjmp.c includes the common pt-longjmp.c and uses strong_alias
to create the longjmp, siglongjmp symbols for glibc version 2.19.
ChangeLog:
* nptl/pt-longjmp.c (DEFINE_LONGJMP): Use libc_ifunc macro.
* sysdeps/unix/sysv/linux/s390/pt-longjmp.c (longjmp, siglongjmp):
Use strong_alias to create symbols for glibc verison 2.19.
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/pt-longjmp.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/nptl/pt-longjmp.c b/nptl/pt-longjmp.c index a1cc286..a19cd59 100644 --- a/nptl/pt-longjmp.c +++ b/nptl/pt-longjmp.c @@ -32,24 +32,12 @@ # if HAVE_IFUNC -static __typeof (longjmp) * -__attribute__ ((used)) -longjmp_resolve (void) -{ - return &__libc_longjmp; -} +# undef INIT_ARCH +# define INIT_ARCH() +# define DEFINE_LONGJMP(name) libc_ifunc (name, &__libc_longjmp) -# ifdef HAVE_ASM_SET_DIRECTIVE -# define DEFINE_LONGJMP(name) \ - asm (".set " #name ", longjmp_resolve\n" \ - ".globl " #name "\n" \ - ".type " #name ", %gnu_indirect_function"); -# else -# define DEFINE_LONGJMP(name) \ - asm (#name " = longjmp_resolve\n" \ - ".globl " #name "\n" \ - ".type " #name ", %gnu_indirect_function"); -# endif +extern __typeof(longjmp) longjmp_ifunc; +extern __typeof(siglongjmp) siglongjmp_ifunc; # else /* !HAVE_IFUNC */ @@ -66,7 +54,7 @@ longjmp_compat (jmp_buf env, int val) DEFINE_LONGJMP (longjmp_ifunc) compat_symbol (libpthread, longjmp_ifunc, longjmp, GLIBC_2_0); -DEFINE_LONGJMP (siglongjmp_ifunc) +strong_alias (longjmp_ifunc, siglongjmp_ifunc) compat_symbol (libpthread, siglongjmp_ifunc, siglongjmp, GLIBC_2_0); #endif |