diff options
author | Stefan Liebler <stli@linux.vnet.ibm.com> | 2014-07-31 20:04:54 +0200 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2014-07-31 20:04:54 +0200 |
commit | 2f438e20ab591641760e97458d5d1569942eced5 (patch) | |
tree | 3fb25d366c77a51ecfbf1c79d4b0b02521573443 /sysdeps/unix/sysv/linux/s390/s390-64 | |
parent | 6c9578a24b5c4182d1c475a32a147478bc757bf3 (diff) | |
download | glibc-2f438e20ab591641760e97458d5d1569942eced5.tar.gz glibc-2f438e20ab591641760e97458d5d1569942eced5.tar.xz glibc-2f438e20ab591641760e97458d5d1569942eced5.zip |
S/390: Revert the jmp_buf/ucontext_t ABI change.
Diffstat (limited to 'sysdeps/unix/sysv/linux/s390/s390-64')
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c | 25 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S (renamed from sysdeps/unix/sysv/linux/s390/s390-64/getcontext-common.S) | 15 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S | 14 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.sym | 25 |
5 files changed, 19 insertions, 61 deletions
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c b/sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c index bc27b08728..a3b1375a0d 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c +++ b/sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c @@ -26,8 +26,8 @@ #include <stdint.h> #include <signal.h> #include <sys/syscall.h> -#include <libc-symbols.h> -#include <shlib-compat.h> + +#define __longjmp ____longjmp_chk #define CHECK_SP(env, guard) \ do \ @@ -51,23 +51,4 @@ } \ } while (0) - -#if defined NOT_IN_libc -/* Build a non-versioned object for rtld-*. */ -# define __longjmp ____longjmp_chk -# include "__longjmp-common.c" - -#else /* !NOT_IN_libc */ -# define __longjmp ____v2__longjmp_chk -# include "__longjmp-common.c" -# undef __longjmp - -# if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_11, GLIBC_2_19) -# undef __longjmp -# define __V1_JMPBUF -# define __longjmp ____v1__longjmp_chk -# include "__longjmp-common.c" -# undef __longjmp - -# endif -#endif /* !NOT_IN_libc */ +#include "__longjmp.c" diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/getcontext-common.S b/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S index 3e61e30702..26a1c514c4 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/getcontext-common.S +++ b/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S @@ -21,6 +21,8 @@ #include "ucontext_i.h" +#include <shlib-compat.h> + /* __getcontext (const ucontext_t *ucp) Saves the machine context in UCP such that when it is activated, @@ -62,10 +64,6 @@ ENTRY(__getcontext) /* Set __getcontext return value to 0. */ slgr %r2,%r2 - /* Store the version number into the uc_flags field. So far - we do not make use of the reserved bytes so we store a zero. */ - stg %r2,SC_FLGS(%r1) - /* Store access registers. */ stam %a0,%a15,SC_ACRS(%r1) @@ -77,3 +75,12 @@ ENTRY(__getcontext) 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. */ +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 diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist index 4576fc8d14..807f702981 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist @@ -98,7 +98,6 @@ GLIBC_2.18 GLIBC_2.19 GLIBC_2.19 A __longjmp_chk F - __setjmp F __sigsetjmp F _longjmp F _setjmp F diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S b/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S index ac74b6bc08..e3e624c91b 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S +++ b/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S @@ -65,25 +65,21 @@ ENTRY(__swapcontext) std %f14,SC_FPRS+112(%r1) std %f15,SC_FPRS+120(%r1) + /* Set __swapcontext return value to 0. */ + slgr %r2,%r2 + /* Store access registers. */ stam %a0,%a15,SC_ACRS(%r1) - /* Set __swapcontext return value to 0. */ - slgr %r2,%r2 - /* Store general purpose registers. */ stmg %r0,%r15,SC_GPRS(%r1) - /* Copy uc_flags into the new ucontext_t. */ - lgr %r5,%r0 - lg %r2,SC_FLGS(%r5) - stg %r2,SC_FLGS(%r1) - /* rt_sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL, sigsetsize). */ la %r2,SIG_BLOCK + lgr %r5,%r0 la %r3,SC_MASK(%r5) - slgr %r4,%r4 lghi %r5,_NSIG8 + slgr %r4,%r4 svc SYS_ify(rt_sigprocmask) /* Load fpu context. */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.sym b/sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.sym deleted file mode 100644 index 6cc9f19624..0000000000 --- a/sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.sym +++ /dev/null @@ -1,25 +0,0 @@ -#include <stddef.h> -#include <signal.h> -#include <sys/ucontext.h> - --- - -SIG_BLOCK -SIG_UNBLOCK -SIG_SETMASK - -_NSIG8 (_NSIG / 8) - -#define ucontext(member) offsetof (ucontext_t, member) -#define mcontext(member) ucontext (uc_mcontext.member) - -SC_FLGS ucontext (uc_flags) -SC_LINK ucontext (uc_link) -SC_STCK ucontext (uc_stack.ss_sp) -SC_STSZ ucontext (uc_stack.ss_size) -SC_PSW mcontext (psw) -SC_GPRS mcontext (gregs) -SC_ACRS mcontext (aregs) -SC_FPC mcontext (fpregs.fpc) -SC_FPRS mcontext (fpregs.fprs) -SC_MASK ucontext (uc_sigmask) |