diff options
author | Stefan Liebler <stli@linux.vnet.ibm.com> | 2015-11-09 16:14:49 +0100 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2015-11-09 16:14:49 +0100 |
commit | 37d13b179cd726bb6d61bfe2f31a1206bc1d9703 (patch) | |
tree | 214fb12f50863e47b70963217b296121ab14b38d /sysdeps/s390/longjmp.c | |
parent | 016495b818cb61df7d0d10e6db54074271b3e3a5 (diff) | |
download | glibc-37d13b179cd726bb6d61bfe2f31a1206bc1d9703.tar glibc-37d13b179cd726bb6d61bfe2f31a1206bc1d9703.tar.gz glibc-37d13b179cd726bb6d61bfe2f31a1206bc1d9703.tar.bz2 glibc-37d13b179cd726bb6d61bfe2f31a1206bc1d9703.zip |
S390: Clean setjmp, longjmp, getcontext symbols.
For each function setjmp, longjmp, getcontext, there exist a symbol
<func> and a default/versioned symbol <func>@@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.
Diffstat (limited to 'sysdeps/s390/longjmp.c')
-rw-r--r-- | sysdeps/s390/longjmp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sysdeps/s390/longjmp.c b/sysdeps/s390/longjmp.c index 9b6fa54d7b..cd2c842233 100644 --- a/sysdeps/s390/longjmp.c +++ b/sysdeps/s390/longjmp.c @@ -20,11 +20,21 @@ #include <shlib-compat.h> +#if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) +/* We don't want the weak alias to longjmp, _longjmp, siglongjmp here, + because we create the default/versioned symbols later. */ +# define __libc_siglongjmp __libc_siglongjmp +#endif /* SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) */ + #include <setjmp/longjmp.c> #if defined SHARED && SHLIB_COMPAT (libc, 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 (__libc_siglongjmp, __libc_longjmp) +libc_hidden_def (__libc_longjmp) + weak_alias (__libc_siglongjmp, __v1_longjmp) weak_alias (__libc_siglongjmp, __v2_longjmp) versioned_symbol (libc, __v1_longjmp, _longjmp, GLIBC_2_0); |