diff options
author | Stefan Liebler <stli@linux.vnet.ibm.com> | 2016-10-07 09:56:47 +0200 |
---|---|---|
committer | Stefan Liebler <stli@linux.vnet.ibm.com> | 2016-10-07 10:12:48 +0200 |
commit | 051f8be7c9466c7e53bf1f3a9d5a83c53a7ea815 (patch) | |
tree | 9ce7158e31c92effc03c76d49e48cf0ab25b217f /nptl | |
parent | 75685c4d98cf260181879b799e403c6cc37418be (diff) | |
download | glibc-051f8be7c9466c7e53bf1f3a9d5a83c53a7ea815.tar glibc-051f8be7c9466c7e53bf1f3a9d5a83c53a7ea815.tar.gz glibc-051f8be7c9466c7e53bf1f3a9d5a83c53a7ea815.tar.bz2 glibc-051f8be7c9466c7e53bf1f3a9d5a83c53a7ea815.zip |
Use libc_ifunc macro for vfork in libpthread.
This patch uses the libc_ifunc macro to create already existing ifunc functions
vfork_ifunc and __vfork_ifunc if HAVE_IFUNC is defined.
ChangeLog:
* nptl/pt-vfork.c (DEFINE_VFORK): Use libc_ifunc macro.
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/pt-vfork.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/nptl/pt-vfork.c b/nptl/pt-vfork.c index 8f4be0c4b3..563e3ec12f 100644 --- a/nptl/pt-vfork.c +++ b/nptl/pt-vfork.c @@ -46,32 +46,20 @@ extern __typeof (vfork) __libc_vfork; /* Defined in libc. */ -static __typeof (vfork) * -__attribute__ ((used)) -vfork_resolve (void) -{ - return &__libc_vfork; -} +# undef INIT_ARCH +# define INIT_ARCH() +# define DEFINE_VFORK(name) libc_ifunc (name, &__libc_vfork) -# ifdef HAVE_ASM_SET_DIRECTIVE -# define DEFINE_VFORK(name) \ - asm (".set " #name ", vfork_resolve\n" \ - ".globl " #name "\n" \ - ".type " #name ", %gnu_indirect_function"); -# else -# define DEFINE_VFORK(name) \ - asm (#name " = vfork_resolve\n" \ - ".globl " #name "\n" \ - ".type " #name ", %gnu_indirect_function"); -# endif #endif #if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_20) +extern __typeof(vfork) vfork_ifunc; DEFINE_VFORK (vfork_ifunc) compat_symbol (libpthread, vfork_ifunc, vfork, GLIBC_2_0); #endif #if SHLIB_COMPAT (libpthread, GLIBC_2_1_2, GLIBC_2_20) +extern __typeof(vfork) __vfork_ifunc; DEFINE_VFORK (__vfork_ifunc) compat_symbol (libpthread, __vfork_ifunc, __vfork, GLIBC_2_1_2); #endif |