summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/s390/s390-64
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/s390/s390-64')
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c27
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/__makecontext_ret.S2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/clone.S2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/dl-cache.h2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/getcontext-common.S (renamed from sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S)8
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/mmap.S2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist11
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/nptl/libpthread.abilist4
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/profil-counter.h2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/sigpending.c2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/sigprocmask.c2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/socket.S2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S21
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/syscall.S2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.sym25
22 files changed, 99 insertions, 29 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 d04d6e5d00..bc27b08728 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/____longjmp_chk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>.
@@ -26,8 +26,8 @@
#include <stdint.h>
#include <signal.h>
#include <sys/syscall.h>
-
-#define __longjmp ____longjmp_chk
+#include <libc-symbols.h>
+#include <shlib-compat.h>
#define CHECK_SP(env, guard) \
do \
@@ -51,4 +51,23 @@
} \
} while (0)
-#include "__longjmp.c"
+
+#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 */
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/__makecontext_ret.S b/sysdeps/unix/sysv/linux/s390/s390-64/__makecontext_ret.S
index 13744fd58e..71ecbab08e 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/__makecontext_ret.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/__makecontext_ret.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2012-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/clone.S b/sysdeps/unix/sysv/linux/s390/s390-64/clone.S
index c90b9bdbf4..ee501b5252 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/clone.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/clone.S
@@ -1,5 +1,5 @@
/* Wrapper around clone system call. 64 bit S/390 version.
- Copyright (C) 2001-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2014 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/dl-cache.h b/sysdeps/unix/sysv/linux/s390/s390-64/dl-cache.h
index 7e3fd198e7..302dab37e3 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/dl-cache.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/dl-cache.h
@@ -1,5 +1,5 @@
/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
- Copyright (C) 2001-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S b/sysdeps/unix/sysv/linux/s390/s390-64/getcontext-common.S
index 7c406cb237..3e61e30702 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/getcontext-common.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
@@ -33,7 +33,7 @@
ENTRY(__getcontext)
lgr %r1,%r2
- /* sigprocmask (SIG_BLOCK, NULL, &sc->sc_mask). */
+ /* rt_sigprocmask (SIG_BLOCK, NULL, &sc->sc_mask, sigsetsize). */
la %r2,SIG_BLOCK
slgr %r3,%r3
la %r4,SC_MASK(%r1)
@@ -62,6 +62,10 @@ 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)
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h b/sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h
index 603bfcb44a..a34bea5881 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h
@@ -1,5 +1,5 @@
/* Definition of `struct stat' used in the kernel.
- Copyright (C) 2003-2013 Free Software Foundation, Inc.
+ Copyright (C) 2003-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c b/sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c
index c925a5cb4f..6623744b9e 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/makecontext.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/mmap.S b/sysdeps/unix/sysv/linux/s390/s390-64/mmap.S
index 2d2ef0c604..de4b711da8 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/mmap.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/mmap.S
@@ -1,5 +1,5 @@
/* Wrapper around mmap system call. 64 bit S/390 version.
- Copyright (C) 2001-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2014 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist
index 265f66d905..4576fc8d14 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist
@@ -95,6 +95,17 @@ GLIBC_2.17
GLIBC_2.18
GLIBC_2.18 A
__cxa_thread_atexit_impl F
+GLIBC_2.19
+ GLIBC_2.19 A
+ __longjmp_chk F
+ __setjmp F
+ __sigsetjmp F
+ _longjmp F
+ _setjmp F
+ getcontext F
+ longjmp F
+ setjmp F
+ siglongjmp F
GLIBC_2.2
GLIBC_2.2 A
_Exit F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libpthread.abilist
index 6613c09b06..51a8a7ff60 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libpthread.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libpthread.abilist
@@ -12,6 +12,10 @@ GLIBC_2.18
GLIBC_2.18 A
pthread_getattr_default_np F
pthread_setattr_default_np F
+GLIBC_2.19
+ GLIBC_2.19 A
+ longjmp F
+ siglongjmp F
GLIBC_2.2
GLIBC_2.2 A
_IO_flockfile F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/profil-counter.h b/sysdeps/unix/sysv/linux/s390/s390-64/profil-counter.h
index fb57859879..b5d243193d 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/profil-counter.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/profil-counter.h
@@ -1,5 +1,5 @@
/* Low-level statistical profiling support function. Linux/s390 version.
- Copyright (C) 2000-2013 Free Software Foundation, Inc.
+ Copyright (C) 2000-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h b/sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h
index 3067c4c374..4621863ff0 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/register-dump.h
@@ -1,5 +1,5 @@
/* Dump registers. 64 bit S/390 version.
- Copyright (C) 2001-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2014 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S b/sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S
index f9ce7b6d33..83df5ce461 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c b/sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c
index d5ce03ce9e..e9a984b5af 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sigpending.c b/sysdeps/unix/sysv/linux/s390/s390-64/sigpending.c
index cffb92a3a7..c9536303d6 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sigpending.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sigpending.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sigprocmask.c b/sysdeps/unix/sysv/linux/s390/s390-64/sigprocmask.c
index bd802739ea..4ef5f06c54 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sigprocmask.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sigprocmask.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/socket.S b/sysdeps/unix/sysv/linux/s390/s390-64/socket.S
index e3fb8b9bec..788599a106 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/socket.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/socket.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2014 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S b/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S
index a626660744..ac74b6bc08 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
@@ -33,6 +33,9 @@
other than the PRESERVED state. */
ENTRY(__swapcontext)
+ /* While not part of the ABI a system call never clobbers r0
+ or r1. So keeping the values here while calling
+ rt_sigprocmask is ok. */
lgr %r1,%r2
lgr %r0,%r3
@@ -62,21 +65,25 @@ 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)
- /* sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL). */
- la %r2,SIG_BLOCK
+ /* 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
la %r3,SC_MASK(%r5)
- lghi %r5,_NSIG8
slgr %r4,%r4
+ lghi %r5,_NSIG8
svc SYS_ify(rt_sigprocmask)
/* Load fpu context. */
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/syscall.S b/sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
index f204d25412..390f974316 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2014 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S
index 0d6af0bd38..0fbfe9c9e0 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2014 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
index 3eea5c9f68..020cd9ad45 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for 64 bit S/390.
- Copyright (C) 2001-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2014 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.sym b/sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.sym
new file mode 100644
index 0000000000..6cc9f19624
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/ucontext_i.sym
@@ -0,0 +1,25 @@
+#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)