summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorGabriel F. T. Gomes <gftg@linux.vnet.ibm.com>2016-05-25 10:04:06 -0300
committerGabriel F. T. Gomes <gftg@linux.vnet.ibm.com>2016-05-25 10:04:06 -0300
commit2feb372c585eb77141adbff24d4958e5a5e6678a (patch)
tree79416b255a6e61e6fdbc913da3be86d87a8a25ff /sysdeps/unix/sysv
parentc69c361ca6bf95f8c665884ee863168a321d472a (diff)
parent916ef0f69613613e11123657bff127bd26104630 (diff)
downloadglibc-ibm/2.20/master.tar.gz
Merge release/2.20/master into ibm/2.20/masteribm/2.20/master
Conflicts: NEWS
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/i386/glob64.c22
-rw-r--r--sysdeps/unix/sysv/linux/s390/bits/hwcap.h1
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S8
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S16
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/__makecontext_ret.S8
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S16
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list19
9 files changed, 51 insertions, 43 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/glob64.c b/sysdeps/unix/sysv/linux/i386/glob64.c
index b4fcd1a73c..802c957d6c 100644
--- a/sysdeps/unix/sysv/linux/i386/glob64.c
+++ b/sysdeps/unix/sysv/linux/i386/glob64.c
@@ -1,3 +1,21 @@
+/* Two glob variants with 64-bit support, for dirent64 and __olddirent64.
+ Copyright (C) 1998-2016 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
#include <dirent.h>
#include <glob.h>
#include <sys/stat.h>
@@ -38,11 +56,15 @@ int __old_glob64 (const char *__pattern, int __flags,
#undef dirent
#define dirent __old_dirent64
+#undef GL_READDIR
+# define GL_READDIR(pglob, stream) \
+ ((struct __old_dirent64 *) (pglob)->gl_readdir (stream))
#undef __readdir
#define __readdir(dirp) __old_readdir64 (dirp)
#undef glob
#define glob(pattern, flags, errfunc, pglob) \
__old_glob64 (pattern, flags, errfunc, pglob)
+#define convert_dirent __old_convert_dirent
#define glob_in_dir __old_glob_in_dir
#define GLOB_ATTRIBUTE attribute_compat_text_section
diff --git a/sysdeps/unix/sysv/linux/s390/bits/hwcap.h b/sysdeps/unix/sysv/linux/s390/bits/hwcap.h
index f4659fcc11..f1f4688bfa 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/hwcap.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/hwcap.h
@@ -35,3 +35,4 @@
#define HWCAP_S390_ETF3EH 256
#define HWCAP_S390_HIGH_GPRS 512
#define HWCAP_S390_TE 1024
+#define HWCAP_S390_VX 2048
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S b/sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S
index 83cf0d8ffa..67ea206de4 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S
@@ -17,6 +17,14 @@
#include <sysdep.h>
+/* We do not want .eh_frame info so that __makecontext_ret stops unwinding
+ if backtrace was called within a context created by makecontext. (There
+ is also no .eh_frame info for _start or thread_start.) */
+#undef cfi_startproc
+#define cfi_startproc
+#undef cfi_endproc
+#define cfi_endproc
+
ENTRY(__makecontext_ret)
basr %r14,%r7
ltr %r8,%r8 /* Check whether uc_link is 0. */
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S b/sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S
index 42839e26f1..b26377398a 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S
@@ -34,7 +34,7 @@ ENTRY(__setcontext)
lr %r1,%r2
/* rt_sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL, sigsetsize). */
- la %r2,SIG_BLOCK
+ la %r2,SIG_SETMASK
la %r3,SC_MASK(%r1)
slr %r4,%r4
lhi %r5,_NSIG8
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S b/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S
index 9206aa334d..8f9cfd834d 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S
@@ -24,7 +24,7 @@
/* __swapcontext (ucontext_t *oucp, const ucontext_t *ucp)
Saves the machine context in oucp such that when it is activated,
- it appears as if __swapcontextt() returned again, restores the
+ it appears as if __swapcontext() returned again, restores the
machine context in ucp and thereby resumes execution in that
context.
@@ -39,13 +39,6 @@ ENTRY(__swapcontext)
lr %r1,%r2
lr %r0,%r3
- /* sigprocmask (SIG_BLOCK, NULL, &sc->sc_mask). */
- la %r2,SIG_BLOCK
- slr %r3,%r3
- la %r4,SC_MASK(%r1)
- lhi %r5,_NSIG8
- svc SYS_ify(rt_sigprocmask)
-
/* Store fpu context. */
stfpc SC_FPC(%r1)
std %f0,SC_FPRS(%r1)
@@ -74,11 +67,12 @@ ENTRY(__swapcontext)
/* Store general purpose registers. */
stm %r0,%r15,SC_GPRS(%r1)
- /* sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL). */
- la %r2,SIG_BLOCK
+ /* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, &oucp->uc_sigmask,
+ sigsetsize). */
+ la %r2,SIG_SETMASK
lr %r5,%r0
la %r3,SC_MASK(%r5)
- slr %r4,%r4
+ la %r4,SC_MASK(%r1)
lhi %r5,_NSIG8
svc SYS_ify(rt_sigprocmask)
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 71ecbab08e..a2bf3ca02d 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/__makecontext_ret.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/__makecontext_ret.S
@@ -17,6 +17,14 @@
#include <sysdep.h>
+/* We do not want .eh_frame info so that __makecontext_ret stops unwinding
+ if backtrace was called within a context created by makecontext. (There
+ is also no .eh_frame info for _start or thread_start.) */
+#undef cfi_startproc
+#define cfi_startproc
+#undef cfi_endproc
+#define cfi_endproc
+
ENTRY(__makecontext_ret)
basr %r14,%r7
ltgr %r8,%r8 /* Check whether uc_link is 0. */
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S b/sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S
index 83df5ce461..1464e6a094 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/setcontext.S
@@ -34,7 +34,7 @@ ENTRY(__setcontext)
lgr %r1,%r2
/* sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL). */
- la %r2,SIG_BLOCK
+ la %r2,SIG_SETMASK
la %r3,SC_MASK(%r1)
slgr %r4,%r4
lghi %r5,_NSIG8
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S b/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S
index e3e624c91b..8346fd5dd1 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/swapcontext.S
@@ -24,7 +24,7 @@
/* __swapcontext (ucontext_t *oucp, const ucontext_t *ucp)
Saves the machine context in oucp such that when it is activated,
- it appears as if __swapcontextt() returned again, restores the
+ it appears as if __swapcontext() returned again, restores the
machine context in ucp and thereby resumes execution in that
context.
@@ -39,13 +39,6 @@ ENTRY(__swapcontext)
lgr %r1,%r2
lgr %r0,%r3
- /* sigprocmask (SIG_BLOCK, NULL, &sc->sc_mask). */
- la %r2,SIG_BLOCK
- slgr %r3,%r3
- la %r4,SC_MASK(%r1)
- lghi %r5,_NSIG8
- svc SYS_ify(rt_sigprocmask)
-
/* Store fpu context. */
stfpc SC_FPC(%r1)
std %f0,SC_FPRS(%r1)
@@ -74,12 +67,13 @@ ENTRY(__swapcontext)
/* Store general purpose registers. */
stmg %r0,%r15,SC_GPRS(%r1)
- /* rt_sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL, sigsetsize). */
- la %r2,SIG_BLOCK
+ /* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, &oucp->uc_sigmask,
+ sigsetsize). */
+ la %r2,SIG_SETMASK
lgr %r5,%r0
la %r3,SC_MASK(%r5)
+ la %r4,SC_MASK(%r1)
lghi %r5,_NSIG8
- slgr %r4,%r4
svc SYS_ify(rt_sigprocmask)
/* Load fpu context. */
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list b/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
index 5b8c1024ac..9f03d26fea 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
@@ -12,22 +12,3 @@ shmget - shmget i:iii __shmget shmget
semop - semop i:ipi __semop semop
semget - semget i:iii __semget semget
semctl - semctl i:iiii __semctl semctl
-
-# proper socket implementations:
-accept - accept Ci:iBN __libc_accept __accept accept
-bind - bind i:ipi __bind bind
-connect - connect Ci:ipi __libc_connect __connect connect
-getpeername - getpeername i:ipp __getpeername getpeername
-getsockname - getsockname i:ipp __getsockname getsockname
-getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
-listen - listen i:ii __listen listen
-recv - recv Ci:ibni __libc_recv __recv recv
-recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
-recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg
-send - send Ci:ibni __libc_send __send send
-sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg
-sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
-setsockopt - setsockopt i:iiibn __setsockopt setsockopt
-shutdown - shutdown i:ii __shutdown shutdown
-socket - socket i:iii __socket socket
-socketpair - socketpair i:iiif __socketpair socketpair