From 37d13b179cd726bb6d61bfe2f31a1206bc1d9703 Mon Sep 17 00:00:00 2001 From: Stefan Liebler Date: Mon, 9 Nov 2015 16:14:49 +0100 Subject: S390: Clean setjmp, longjmp, getcontext symbols. For each function setjmp, longjmp, getcontext, there exist a symbol and a default/versioned symbol @@GLIBC_2.x in the build obj-files. This is wrong because it should only exist an unversioned or a default-versioned symbol with the same name in an obj-file. Glibc can't be build with recent binutils. See the already fixed linker bug https://sourceware.org/bugzilla/show_bug.cgi?id=19073. Nevertheless, this patch cleans this up. Furthermore the BSD entry points setjmp, _setjmp were marked as weak, but should be strong as on other architectures. (see https://sourceware.org/ml/libc-alpha/2014-07/msg00568.html for an older discussion with Andreas Schwab) Some whitespace issues are corrected in sysdeps/s390/s390-64/setjmp.S, too. But there is no change in the assembler code. ChangeLog: * sysdeps/s390/longjmp.c (longjmp, _longjmp, siglongjmp): Don't create weak aliases, because versioned symbols are created later. * sysdeps/s390/s390-32/setjmp.S (setjmp, _setjmp): Remove weak and rename to an unique name in SHARED case due to existing versioned symbols. * sysdeps/s390/s390-64/setjmp.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S (getcontext): Create weak alias only in non SHARED case. * sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S: Likewise. --- sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S | 9 ++++++--- sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'sysdeps/unix/sysv/linux') diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S b/sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S index 9b477b5..e1a9740 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S @@ -74,8 +74,6 @@ ENTRY(__getcontext) br %r14 END(__getcontext) -weak_alias (__getcontext, getcontext) - #if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) /* In glibc release 2.19 a new version of getcontext was introduced, but was reverted before 2.20. Thus both versions are the same function. */ @@ -83,4 +81,9 @@ weak_alias (__getcontext, __v1__getcontext) weak_alias (__getcontext, __v2__getcontext) versioned_symbol (libc, __v1__getcontext, getcontext, GLIBC_2_1) compat_symbol (libc, __v2__getcontext, getcontext, GLIBC_2_19) -#endif + +#else + +weak_alias (__getcontext, getcontext) + +#endif /* !(defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)) */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S b/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S index e781ce7..9a118b7 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S +++ b/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S @@ -74,8 +74,6 @@ ENTRY(__getcontext) br %r14 END(__getcontext) -weak_alias (__getcontext, getcontext) - #if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) /* In glibc release 2.19 a new version of getcontext was introduced, but was reverted before 2.20. Thus both versions are the same function. */ @@ -83,4 +81,9 @@ weak_alias (__getcontext, __v1__getcontext) weak_alias (__getcontext, __v2__getcontext) versioned_symbol (libc, __v1__getcontext, getcontext, GLIBC_2_1) compat_symbol (libc, __v2__getcontext, getcontext, GLIBC_2_19) -#endif + +#else + +weak_alias (__getcontext, getcontext) + +#endif /* !(defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)) */ -- cgit v1.1