summaryrefslogtreecommitdiff
path: root/sysdeps/s390/s390-32
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-20 19:14:56 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-20 19:14:56 +0200
commitf76453c31593957fec1a99b986bfa5506618b79c (patch)
treeda353c882fb9b2261c9871bcb9e3876a3e6ed7f6 /sysdeps/s390/s390-32
parent58695b88a9deaecbcf7794760cc333177edaa2b4 (diff)
parent78bd7499af46d739ce94410eaeea006e874ca9e5 (diff)
Merge tag 'glibc-2.22' into baseline
The GNU C Library ================= The GNU C Library version 2.22 is now available. The GNU C Library is used as *the* C library in the GNU system and in GNU/Linux systems, as well as many other systems that use Linux as the kernel. The GNU C Library is primarily designed to be a portable and high performance C library. It follows all relevant standards including ISO C11 and POSIX.1-2008. It is also internationalized and has one of the most complete internationalization interfaces known. The GNU C Library webpage is at http://www.gnu.org/software/libc/ Packages for the 2.22 release may be downloaded from: http://ftpmirror.gnu.org/libc/ http://ftp.gnu.org/gnu/libc/ The mirror list is at http://www.gnu.org/order/ftp.html NEWS for version 2.22 ===================== * The following bugs are resolved with this release: 438, 4719, 6544, 6792, 11216, 12836, 13028, 13064, 13151, 13152, 14094, 14292, 14841, 14906, 14958, 15319, 15467, 15790, 15969, 16159, 16339, 16350, 16351, 16352, 16353, 16361, 16512, 16526, 16538, 16559, 16560, 16704, 16783, 16850, 17053, 17090, 17195, 17269, 17293, 17322, 17403, 17475, 17523, 17542, 17569, 17581, 17588, 17596, 17620, 17621, 17628, 17631, 17692, 17711, 17715, 17776, 17779, 17792, 17833, 17836, 17841, 17912, 17916, 17930, 17932, 17944, 17949, 17964, 17965, 17967, 17969, 17977, 17978, 17987, 17991, 17996, 17998, 17999, 18007, 18019, 18020, 18029, 18030, 18032, 18034, 18036, 18038, 18039, 18042, 18043, 18046, 18047, 18049, 18068, 18080, 18093, 18100, 18104, 18110, 18111, 18116, 18125, 18128, 18134, 18138, 18185, 18196, 18197, 18206, 18210, 18211, 18217, 18219, 18220, 18221, 18234, 18244, 18245, 18247, 18287, 18319, 18324, 18333, 18346, 18371, 18383, 18397, 18400, 18409, 18410, 18412, 18418, 18422, 18434, 18444, 18457, 18468, 18469, 18470, 18479, 18483, 18495, 18496, 18497, 18498, 18502, 18507, 18508, 18512, 18513, 18519, 18520, 18522, 18527, 18528, 18529, 18530, 18532, 18533, 18534, 18536, 18539, 18540, 18542, 18544, 18545, 18546, 18547, 18549, 18553, 18557, 18558, 18569, 18583, 18585, 18586, 18592, 18593, 18594, 18602, 18612, 18613, 18619, 18633, 18641, 18643, 18648, 18657, 18676, 18694, 18696. * Cache information can be queried via sysconf() function on s390 e.g. with _SC_LEVEL1_ICACHE_SIZE as argument. * A buffer overflow in gethostbyname_r and related functions performing DNS requests has been fixed. If the NSS functions were called with a misaligned buffer, the buffer length change due to pointer alignment was not taken into account. This could result in application crashes or, potentially arbitrary code execution, using crafted, but syntactically valid DNS responses. (CVE-2015-1781) * The time zone file parser has been made more robust against crafted time zone files, avoiding heap buffer overflows related to the processing of the tzh_ttisstdcnt and tzh_ttisgmtcnt fields, and a stack overflow due to large time zone data files. Overly long time zone specifiers in the TZ variable no longer result in stack overflows and crashes. * A powerpc and powerpc64 optimization for TLS, similar to TLS descriptors for LD and GD on x86 and x86-64, has been implemented. You will need binutils-2.24 or later to enable this optimization. * Character encoding and ctype tables were updated to Unicode 7.0.0, using new generator scripts contributed by Pravin Satpute and Mike FABIAN (Red Hat). These updates cause user visible changes, such as the fix for bug 17998. * CVE-2014-8121 The NSS backends shared internal state between the getXXent and getXXbyYY NSS calls for the same database, causing a denial-of-service condition in some applications. * Added vector math library named libmvec with the following vectorized x86_64 implementations: cos, cosf, sin, sinf, sincos, sincosf, log, logf, exp, expf, pow, powf. The library can be disabled with --disable-mathvec. Use of the functions is enabled with -fopenmp -ffast-math starting from -O1 for GCC version >= 4.9.0. Shared library libmvec.so is linked in as needed when using -lm (no need to specify -lmvec explicitly for not static builds). Visit <https://sourceware.org/glibc/wiki/libmvec> for detailed information. * A new fmemopen implementation has been added with the goal of POSIX compliance. The new implementation fixes the following long-standing issues: BZ#6544, BZ#11216, BZ#12836, BZ#13151, BZ#13152, and BZ#14292. The old implementation is still present for use be by existing binaries. * The 32-bit sparc sigaction ABI was inadvertently broken in the 2.20 and 2.21 releases. It has been fixed to match 2.19 and older, but binaries built against 2.20 and 2.21 might need to be recompiled. See BZ#18694. * Port to Native Client running on ARMv7-A (--host=arm-nacl). Contributed by Roland McGrath (Google). Contributors ============ This release was made possible by the contributions of many people. The maintainers are grateful to everyone who has contributed changes or bug reports. These include: Adhemerval Zanella Alan Modra Alexandre Oliva Andreas Schwab Andrew Senkevich Andriy Rysin Arjun Shankar Aurelien Jarno Benno Schulenberg Brad Hubbard Carlos O'Donell Chris Metcalf Christian Schmidt Chung-Lin Tang Cong Wang Cyril Hrubis Daniel Marjamäki David S. Miller Dmitry V. Levin Eric Rannaud Evangelos Foutras Feng Gao Florian Weimer Gleb Fotengauer-Malinovskiy H.J. Lu Igor Zamyatin J William Piggott James Cowgill James Lemke John David Anglin Joseph Myers Kevin Easton Khem Raj Leonhard Holz Mark Wielaard Marko Myllynen Martin Galvan Martin Sebor Matthew Fortune Mel Gorman Mike Frysinger Miroslav Lichvar Nathan Lynch Ondřej Bílka Paul Eggert Paul Pluzhnikov Pavel Kopyl Pravin Satpute Rajalakshmi Srinivasaraghavan Rical Jasan Richard Henderson Roland McGrath Rüdiger Sonderfeld Samuel Thibault Siddhesh Poyarekar Stefan Liebler Steve Ellcey Szabolcs Nagy Torvald Riegel Tulio Magno Quites Machado Filho Vincent Bernat Wilco Dijkstra Yaakov Selkowitz Zack Weinberg
Diffstat (limited to 'sysdeps/s390/s390-32')
-rw-r--r--sysdeps/s390/s390-32/__longjmp.c (renamed from sysdeps/s390/s390-32/__longjmp-common.c)25
-rw-r--r--sysdeps/s390/s390-32/add_n.S2
-rw-r--r--sysdeps/s390/s390-32/addmul_1.S2
-rw-r--r--sysdeps/s390/s390-32/backtrace.c13
-rw-r--r--sysdeps/s390/s390-32/bcopy.S4
-rw-r--r--sysdeps/s390/s390-32/bits/wordsize.h1
-rw-r--r--sysdeps/s390/s390-32/bzero.S2
-rw-r--r--sysdeps/s390/s390-32/configure5
-rw-r--r--sysdeps/s390/s390-32/configure.ac6
-rw-r--r--sysdeps/s390/s390-32/crti.S2
-rw-r--r--sysdeps/s390/s390-32/crtn.S2
-rw-r--r--sysdeps/s390/s390-32/dl-machine.h74
-rw-r--r--sysdeps/s390/s390-32/dl-sysdep.h23
-rw-r--r--sysdeps/s390/s390-32/dl-trampoline.S2
-rw-r--r--sysdeps/s390/s390-32/memchr.S2
-rw-r--r--sysdeps/s390/s390-32/memcmp.S6
-rw-r--r--sysdeps/s390/s390-32/memcpy.S12
-rw-r--r--sysdeps/s390/s390-32/memset.S6
-rw-r--r--sysdeps/s390/s390-32/mul_1.S2
-rw-r--r--sysdeps/s390/s390-32/multiarch/ifunc-resolve.c20
-rw-r--r--sysdeps/s390/s390-32/multiarch/memcmp.S18
-rw-r--r--sysdeps/s390/s390-32/multiarch/memcpy.S20
-rw-r--r--sysdeps/s390/s390-32/multiarch/memset.S24
-rw-r--r--sysdeps/s390/s390-32/s390-mcount.S2
-rw-r--r--sysdeps/s390/s390-32/setjmp-common.S84
-rw-r--r--sysdeps/s390/s390-32/setjmp.S115
-rw-r--r--sysdeps/s390/s390-32/start.S2
-rw-r--r--sysdeps/s390/s390-32/strcmp.S2
-rw-r--r--sysdeps/s390/s390-32/strcpy.S2
-rw-r--r--sysdeps/s390/s390-32/strncpy.S2
-rw-r--r--sysdeps/s390/s390-32/sub_n.S2
-rw-r--r--sysdeps/s390/s390-32/sysdep.h2
-rw-r--r--sysdeps/s390/s390-32/tst-audit.h2
33 files changed, 290 insertions, 198 deletions
diff --git a/sysdeps/s390/s390-32/__longjmp-common.c b/sysdeps/s390/s390-32/__longjmp.c
index f78ef656e5..b253934083 100644
--- a/sysdeps/s390/s390-32/__longjmp-common.c
+++ b/sysdeps/s390/s390-32/__longjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2014 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
@@ -22,10 +22,11 @@
#include <bits/setjmp.h>
#include <stdlib.h>
#include <unistd.h>
+#include <stap-probe.h>
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0. */
-attribute_hidden void
+void
__longjmp (__jmp_buf env, int val)
{
#ifdef PTR_DEMANGLE
@@ -42,17 +43,31 @@ __longjmp (__jmp_buf env, int val)
register void *r1 __asm ("%r1") = (void *) env;
#endif
/* Restore registers and jump back. */
- asm volatile ("ld %%f6,48(%1)\n\t"
- "ld %%f4,40(%1)\n\t"
+ asm volatile (
+ /* longjmp probe expects longjmp first argument, second
+ argument and target address. */
#ifdef PTR_DEMANGLE
- "lm %%r6,%%r13,0(%1)\n\t"
"lm %%r4,%%r5,32(%1)\n\t"
"xr %%r4,%2\n\t"
"xr %%r5,%2\n\t"
+ LIBC_PROBE_ASM (longjmp, 4@%1 -4@%0 4@%%r4)
+#else
+ LIBC_PROBE_ASM (longjmp, 4@%1 -4@%0 4@%%r14)
+#endif
+
+ /* restore fpregs */
+ "ld %%f6,48(%1)\n\t"
+ "ld %%f4,40(%1)\n\t"
+
+ /* restore gregs and return to jmp_buf target */
+#ifdef PTR_DEMANGLE
+ "lm %%r6,%%r13,0(%1)\n\t"
"lr %%r15,%%r5\n\t"
+ LIBC_PROBE_ASM (longjmp_target, 4@%1 -4@%0 4@%%r4)
"br %%r4"
#else
"lm %%r6,%%r15,0(%1)\n\t"
+ LIBC_PROBE_ASM (longjmp_target, 4@%1 -4@%0 4@%%r14)
"br %%r14"
#endif
: : "r" (r2),
diff --git a/sysdeps/s390/s390-32/add_n.S b/sysdeps/s390/s390-32/add_n.S
index 66847177a6..0e0927837f 100644
--- a/sysdeps/s390/s390-32/add_n.S
+++ b/sysdeps/s390/s390-32/add_n.S
@@ -1,6 +1,6 @@
/* Add two limb vectors of the same length > 0 and store sum in a third
limb vector.
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU MP Library.
diff --git a/sysdeps/s390/s390-32/addmul_1.S b/sysdeps/s390/s390-32/addmul_1.S
index 92ff4a3424..f6575234ea 100644
--- a/sysdeps/s390/s390-32/addmul_1.S
+++ b/sysdeps/s390/s390-32/addmul_1.S
@@ -1,6 +1,6 @@
/* S390 __mpn_addmul_1 -- Multiply a limb vector with a limb and add
the result to a second limb vector.
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU MP Library.
diff --git a/sysdeps/s390/s390-32/backtrace.c b/sysdeps/s390/s390-32/backtrace.c
index 3ade10c85b..73db65275d 100644
--- a/sysdeps/s390/s390-32/backtrace.c
+++ b/sysdeps/s390/s390-32/backtrace.c
@@ -1,5 +1,5 @@
/* Return backtrace of current program state.
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>.
This file is part of the GNU C Library.
@@ -77,10 +77,6 @@ init (void)
if (unwind_getip == NULL)
unwind_backtrace = NULL;
}
-#else
-# define unwind_backtrace _Unwind_Backtrace
-# define unwind_getip _Unwind_GetIP
-#endif
static int
__backchain_backtrace (void **array, int size)
@@ -107,6 +103,10 @@ __backchain_backtrace (void **array, int size)
return cnt;
}
+#else
+# define unwind_backtrace _Unwind_Backtrace
+# define unwind_getip _Unwind_GetIP
+#endif
static _Unwind_Reason_Code
backtrace_helper (struct _Unwind_Context *ctx, void *a)
@@ -130,9 +130,10 @@ __backtrace (void **array, int size)
__libc_once_define (static, once);
__libc_once (once, init);
-#endif
+
if (unwind_backtrace == NULL)
return __backchain_backtrace (array, size);
+#endif
if (size >= 1)
unwind_backtrace (backtrace_helper, &arg);
diff --git a/sysdeps/s390/s390-32/bcopy.S b/sysdeps/s390/s390-32/bcopy.S
index d4403dc4d8..0a42f93f23 100644
--- a/sysdeps/s390/s390-32/bcopy.S
+++ b/sysdeps/s390/s390-32/bcopy.S
@@ -1,6 +1,6 @@
/* bcopy -- copy a block from source to destination. S/390 version.
This file is part of the GNU C Library.
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
The GNU C Library is free software; you can redistribute it and/or
@@ -68,7 +68,7 @@ ENTRY(__bcopy)
#ifdef PIC
al %r1,.L9-.L8(%r1) # get address of global offset table
# load address of memmove
- l %r1,memmove@GOT12(%r1)
+ l %r1,memmove@GOT(%r1)
br %r1
.L9: .long _GLOBAL_OFFSET_TABLE_-.L8
#else
diff --git a/sysdeps/s390/s390-32/bits/wordsize.h b/sysdeps/s390/s390-32/bits/wordsize.h
index b41661217f..da791fa28e 100644
--- a/sysdeps/s390/s390-32/bits/wordsize.h
+++ b/sysdeps/s390/s390-32/bits/wordsize.h
@@ -4,6 +4,7 @@
# define __WORDSIZE 64
#else
# define __WORDSIZE 32
+# define __WORDSIZE32_SIZE_ULONG 1
#endif
#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
diff --git a/sysdeps/s390/s390-32/bzero.S b/sysdeps/s390/s390-32/bzero.S
index 7be59e21f3..7c03c3eb9d 100644
--- a/sysdeps/s390/s390-32/bzero.S
+++ b/sysdeps/s390/s390-32/bzero.S
@@ -1,6 +1,6 @@
/* bzero -- set a block of memory to zero. IBM S390 version
This file is part of the GNU C Library.
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/s390/s390-32/configure b/sysdeps/s390/s390-32/configure
deleted file mode 100644
index 024565f85a..0000000000
--- a/sysdeps/s390/s390-32/configure
+++ /dev/null
@@ -1,5 +0,0 @@
-# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
- # Local configure fragment for sysdeps/s390.
-
-$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
-
diff --git a/sysdeps/s390/s390-32/configure.ac b/sysdeps/s390/s390-32/configure.ac
deleted file mode 100644
index b5af4e12fc..0000000000
--- a/sysdeps/s390/s390-32/configure.ac
+++ /dev/null
@@ -1,6 +0,0 @@
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/s390.
-
-dnl It is always possible to access static and hidden symbols in an
-dnl position independent way.
-AC_DEFINE(PI_STATIC_AND_HIDDEN)
diff --git a/sysdeps/s390/s390-32/crti.S b/sysdeps/s390/s390-32/crti.S
index 3d448308b3..87444a9ffc 100644
--- a/sysdeps/s390/s390-32/crti.S
+++ b/sysdeps/s390/s390-32/crti.S
@@ -1,5 +1,5 @@
/* Special .init and .fini section support for S/390.
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 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/s390/s390-32/crtn.S b/sysdeps/s390/s390-32/crtn.S
index c363c919cf..fcf2788af0 100644
--- a/sysdeps/s390/s390-32/crtn.S
+++ b/sysdeps/s390/s390-32/crtn.S
@@ -1,5 +1,5 @@
/* Special .init and .fini section support for S/390.
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 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/s390/s390-32/dl-machine.h b/sysdeps/s390/s390-32/dl-machine.h
index 928581ed49..119e7b568c 100644
--- a/sysdeps/s390/s390-32/dl-machine.h
+++ b/sysdeps/s390/s390-32/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. S390 Version.
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 Free Software Foundation, Inc.
Contributed by Carl Pederson & Martin Schwidefsky.
This file is part of the GNU C Library.
@@ -72,11 +72,11 @@ elf_machine_load_address (void)
asm( " bras 1,2f\n"
"1: .long _GLOBAL_OFFSET_TABLE_ - 1b\n"
- " .long _dl_start - 1b - 0x80000000\n"
+ " .long (_dl_start - 1b - 0x80000000) & 0x00000000ffffffff\n"
"2: l %0,4(1)\n"
" ar %0,1\n"
" al 1,0(1)\n"
- " sl %0,_dl_start@GOT12(1)"
+ " sl %0,_dl_start@GOT(1)"
: "=&d" (addr) : : "1" );
return addr;
}
@@ -114,7 +114,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
to intercept the calls to collect information. In this case we
don't store the address in the GOT so that all future calls also
end in this function. */
- if (__builtin_expect (profile, 0))
+ if (__glibc_unlikely (profile))
{
got[2] = (Elf32_Addr) &_dl_runtime_profile;
@@ -148,7 +148,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
.globl _dl_start_user\n\
_start:\n\
basr %r13,0\n\
-.L0: ahi %r13,.Llit-.L0\n\
+0: ahi %r13,.Llit-0b\n\
lr %r2,%r15\n\
# Alloc stack frame\n\
ahi %r15,-96\n\
@@ -165,19 +165,50 @@ _dl_start_user:\n\
ar %r12,%r13\n\
# See if we were run as a command with the executable file\n\
# name as an extra leading argument.\n\
- l %r1,_dl_skip_args@GOT12(0,%r12)\n\
- l %r1,0(%r1) # load _dl_skip_args\n\
+ l %r1,_dl_skip_args@GOT(%r12)\n\
+ l %r1,0(%r1) # load _dl_skip_args\n\
+ ltr %r1,%r1\n\
+ je 4f # Skip the arg adjustment if there were none.\n\
# Get the original argument count.\n\
l %r0,96(%r15)\n\
# Subtract _dl_skip_args from it.\n\
sr %r0,%r1\n\
- # Adjust the stack pointer to skip _dl_skip_args words.\n\
- sll %r1,2\n\
- ar %r15,%r1\n\
- # Set the back chain to zero again\n\
- xc 0(4,%r15),0(%r15)\n\
# Store back the modified argument count.\n\
st %r0,96(%r15)\n\
+ # Copy argv and envp forward to account for skipped argv entries.\n\
+ # We skipped at least one argument or we would not get here.\n\
+ la %r6,100(%r15) # Destination pointer i.e. &argv[0]\n\
+ lr %r5,%r6\n\
+ lr %r0,%r1\n\
+ sll %r0,2\n # Number of skipped bytes.\n\
+ ar %r5,%r0 # Source pointer = Dest + Skipped args.\n\
+ # argv copy loop:\n\
+1: l %r7,0(%r5) # Load a word from the source.\n\
+ st %r7,0(%r6) # Store the word in the destination.\n\
+ ahi %r5,4\n\
+ ahi %r6,4\n\
+ ltr %r7,%r7\n\
+ jne 1b # Stop after copying the NULL.\n\
+ # envp copy loop:\n\
+2: l %r7,0(%r5) # Load a word from the source.\n\
+ st %r7,0(%r6) # Store the word in the destination.\n\
+ ahi %r5,4\n\
+ ahi %r6,4\n\
+ ltr %r7,%r7\n\
+ jne 2b # Stop after copying the NULL.\n\
+ # Now we have to zero out the envp entries after NULL to allow\n\
+ # start.S to properly find auxv by skipping zeroes.\n\
+ # zero out loop:\n\
+ lhi %r7,0\n\
+3: st %r7,0(%r6) # Store zero.\n\
+ ahi %r6,4 # Advance dest pointer.\n\
+ ahi %r1,-1 # Subtract one from the word count.\n\
+ ltr %r1,%r1\n\
+ jne 3b # Keep copying if the word count is non-zero.\n\
+ # Adjust _dl_argv\n\
+ la %r6,100(%r15)\n\
+ l %r1,_dl_argv@GOT(%r12)\n\
+ st %r6,0(%r1)\n\
# The special initializer gets called with the stack just\n\
# as the application's entry point will see it; it can\n\
# switch stacks if it moves these contents over.\n\
@@ -185,7 +216,7 @@ _dl_start_user:\n\
# Call the function to run the initializers.\n\
# Load the parameters:\n\
# (%r2, %r3, %r4, %r5) = (_dl_loaded, argc, argv, envp)\n\
- l %r2,_rtld_local@GOT(%r12)\n\
+4: l %r2,_rtld_local@GOT(%r12)\n\
l %r2,0(%r2)\n\
l %r3,96(%r15)\n\
la %r4,100(%r15)\n\
@@ -203,7 +234,7 @@ _dl_start_user:\n\
.Llit:\n\
.Ladr0: .long _GLOBAL_OFFSET_TABLE_-.Llit\n\
.Ladr1: .long _dl_start-.Llit\n\
-.Ladr4: .long _dl_init_internal@PLT-.Llit\n\
+.Ladr4: .long _dl_init@PLT-.Llit\n\
");
#ifndef RTLD_START_SPECIAL_INIT
@@ -213,7 +244,7 @@ _dl_start_user:\n\
/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
TLS variable, so undefined references should not be allowed to
define the value.
- ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+ ELF_RTYPE_CLASS_COPY iff TYPE should not be allowed to resolve to one
of the main executable's symbols, as for a COPY reloc. */
#define elf_machine_type_class(type) \
((((type) == R_390_JMP_SLOT || (type) == R_390_TLS_DTPMOD \
@@ -226,6 +257,7 @@ _dl_start_user:\n\
/* The S390 never uses Elf32_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
/* We define an initialization functions. This is called very early in
_dl_sysdep_start. */
@@ -277,7 +309,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
- if (__builtin_expect (r_type == R_390_RELATIVE, 0))
+ if (__glibc_unlikely (r_type == R_390_RELATIVE))
{
# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
/* This is defined in rtld.c, but nowhere in the static libc.a;
@@ -295,7 +327,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
}
else
#endif
- if (__builtin_expect (r_type == R_390_NONE, 0))
+ if (__glibc_unlikely (r_type == R_390_NONE))
return;
else
{
@@ -316,7 +348,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
{
case R_390_IRELATIVE:
value = map->l_addr + reloc->r_addend;
- if (__builtin_expect (!skip_ifunc, 1))
+ if (__glibc_likely (!skip_ifunc))
value = elf_ifunc_invoke (value);
*reloc_addr = value;
break;
@@ -448,7 +480,7 @@ elf_machine_lazy_rel (struct link_map *map,
Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
/* Check for unexpected PLT reloc type. */
- if (__builtin_expect (r_type == R_390_JMP_SLOT, 1))
+ if (__glibc_likely (r_type == R_390_JMP_SLOT))
{
if (__builtin_expect (map->l_mach.plt, 0) == 0)
*reloc_addr += l_addr;
@@ -457,10 +489,10 @@ elf_machine_lazy_rel (struct link_map *map,
map->l_mach.plt
+ (((Elf32_Addr) reloc_addr) - map->l_mach.gotplt) * 8;
}
- else if (__builtin_expect (r_type == R_390_IRELATIVE, 1))
+ else if (__glibc_likely (r_type == R_390_IRELATIVE))
{
Elf32_Addr value = map->l_addr + reloc->r_addend;
- if (__builtin_expect (!skip_ifunc, 1))
+ if (__glibc_likely (!skip_ifunc))
value = elf_ifunc_invoke (value);
*reloc_addr = value;
}
diff --git a/sysdeps/s390/s390-32/dl-sysdep.h b/sysdeps/s390/s390-32/dl-sysdep.h
new file mode 100644
index 0000000000..d7a4e53ba3
--- /dev/null
+++ b/sysdeps/s390/s390-32/dl-sysdep.h
@@ -0,0 +1,23 @@
+/* System-specific settings for dynamic linker code. S/390 version.
+ Copyright (C) 2014-2015 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_next <dl-sysdep.h>
+
+/* _dl_argv cannot be attribute_relro, because _dl_start_user
+ might write into it after _dl_start returns. */
+#define DL_ARGV_NOT_RELRO 1
diff --git a/sysdeps/s390/s390-32/dl-trampoline.S b/sysdeps/s390/s390-32/dl-trampoline.S
index d3a8548259..df3e7dbec2 100644
--- a/sysdeps/s390/s390-32/dl-trampoline.S
+++ b/sysdeps/s390/s390-32/dl-trampoline.S
@@ -1,5 +1,5 @@
/* PLT trampolines. s390 version.
- Copyright (C) 2005-2014 Free Software Foundation, Inc.
+ Copyright (C) 2005-2015 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/s390/s390-32/memchr.S b/sysdeps/s390/s390-32/memchr.S
index d11a853db8..af550ca372 100644
--- a/sysdeps/s390/s390-32/memchr.S
+++ b/sysdeps/s390/s390-32/memchr.S
@@ -1,5 +1,5 @@
/* Search a character in a block of memory. For IBM S390
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 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/s390/s390-32/memcmp.S b/sysdeps/s390/s390-32/memcmp.S
index 0c85906528..93f06d57a3 100644
--- a/sysdeps/s390/s390-32/memcmp.S
+++ b/sysdeps/s390/s390-32/memcmp.S
@@ -1,5 +1,5 @@
/* memcmp - compare two memory blocks. 32 bit S/390 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 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
@@ -27,7 +27,7 @@
.text
#ifdef USE_MULTIARCH
-ENTRY(memcmp_g5)
+ENTRY(__memcmp_g5)
#else
ENTRY(memcmp)
#endif
@@ -58,7 +58,7 @@ ENTRY(memcmp)
.L_G5_17:
clc 0(1,%r3),0(%r2)
#ifdef USE_MULTIARCH
-END(memcmp_g5)
+END(__memcmp_g5)
#else
END(memcmp)
libc_hidden_builtin_def (memcmp)
diff --git a/sysdeps/s390/s390-32/memcpy.S b/sysdeps/s390/s390-32/memcpy.S
index b516a0946f..f26fd00ff8 100644
--- a/sysdeps/s390/s390-32/memcpy.S
+++ b/sysdeps/s390/s390-32/memcpy.S
@@ -1,5 +1,5 @@
/* memcpy - copy a block from source to destination. S/390 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 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
@@ -26,7 +26,7 @@
%r4 = number of bytes to copy. */
#ifdef USE_MULTIARCH
-ENTRY(memcpy_g5)
+ENTRY(__memcpy_g5)
#else
ENTRY(memcpy)
#endif
@@ -49,7 +49,7 @@ ENTRY(memcpy)
br %r14
.L_G5_13:
chi %r5,4096 # Switch to mvcle for copies >1MB
- jh memcpy_mvcle
+ jh __memcpy_mvcle
.L_G5_12:
mvc 0(256,%r1),0(%r3)
la %r1,256(%r1)
@@ -60,13 +60,13 @@ ENTRY(memcpy)
.L_G5_17:
mvc 0(1,%r1),0(%r3)
#ifdef USE_MULTIARCH
-END(memcpy_g5)
+END(__memcpy_g5)
#else
END(memcpy)
libc_hidden_builtin_def (memcpy)
#endif
-ENTRY(memcpy_mvcle)
+ENTRY(__memcpy_mvcle)
# Using as standalone function will result in unexpected
# results since the length field is incremented by 1 in order to
# compensate the changes already done in the functions above.
@@ -79,4 +79,4 @@ ENTRY(memcpy_mvcle)
jo .L_MVCLE_1
lr %r2,%r1 # return destination address
br %r14
-END(memcpy_mvcle)
+END(__memcpy_mvcle)
diff --git a/sysdeps/s390/s390-32/memset.S b/sysdeps/s390/s390-32/memset.S
index 63481a264c..0abba61c22 100644
--- a/sysdeps/s390/s390-32/memset.S
+++ b/sysdeps/s390/s390-32/memset.S
@@ -1,5 +1,5 @@
/* Set a block of memory to some byte value. For IBM S390
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 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
@@ -28,7 +28,7 @@
.text
#ifdef USE_MULTIARCH
-ENTRY(memset_g5)
+ENTRY(__memset_g5)
#else
ENTRY(memset)
#endif
@@ -58,7 +58,7 @@ ENTRY(memset)
.L_G5_20:
mvc 1(1,%r1),0(%r1)
#ifdef USE_MULTIARCH
-END(memset_g5)
+END(__memset_g5)
#else
END(memset)
libc_hidden_builtin_def (memset)
diff --git a/sysdeps/s390/s390-32/mul_1.S b/sysdeps/s390/s390-32/mul_1.S
index c9df239973..bd8b805fe0 100644
--- a/sysdeps/s390/s390-32/mul_1.S
+++ b/sysdeps/s390/s390-32/mul_1.S
@@ -1,6 +1,6 @@
/* __mpn_mul_1 -- Multiply a limb vector with a limb and store
the result in a second limb vector.
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU MP Library.
diff --git a/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c b/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
index 2ccfc9c105..8e0cdd5df1 100644
--- a/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
+++ b/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
@@ -1,6 +1,6 @@
/* IFUNC resolver function for CPU specific functions.
32 bit S/390 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 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
@@ -23,22 +23,22 @@
#define STFLE_BITS_Z10 34 /* General instructions extension */
#define STFLE_BITS_Z196 45 /* Distinct operands, pop ... */
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
#define IFUNC_RESOLVE(FUNC) \
asm (".globl " #FUNC "\n\t" \
".type " #FUNC ",@gnu_indirect_function\n\t" \
- ".set " #FUNC ",resolve_" #FUNC "\n\t" \
+ ".set " #FUNC ",__resolve_" #FUNC "\n\t" \
".globl __GI_" #FUNC "\n\t" \
".set __GI_" #FUNC "," #FUNC "\n"); \
\
/* Make the declarations of the optimized functions hidden in order
to prevent GOT slots being generated for them. */ \
- extern void *FUNC##_z196 attribute_hidden; \
- extern void *FUNC##_z10 attribute_hidden; \
- extern void *FUNC##_g5 attribute_hidden; \
+ extern void *__##FUNC##_z196 attribute_hidden; \
+ extern void *__##FUNC##_z10 attribute_hidden; \
+ extern void *__##FUNC##_g5 attribute_hidden; \
\
- void *resolve_##FUNC (unsigned long int dl_hwcap) \
+ void *__resolve_##FUNC (unsigned long int dl_hwcap) \
{ \
if ((dl_hwcap & HWCAP_S390_STFLE) \
&& (dl_hwcap & HWCAP_S390_ZARCH) \
@@ -53,11 +53,11 @@
: : "cc"); \
\
if ((stfle_bits & (1ULL << (63 - STFLE_BITS_Z196))) != 0) \
- return &FUNC##_z196; \
+ return &__##FUNC##_z196; \
else if ((stfle_bits & (1ULL << (63 - STFLE_BITS_Z10))) != 0) \
- return &FUNC##_z10; \
+ return &__##FUNC##_z10; \
} \
- return &FUNC##_g5; \
+ return &__##FUNC##_g5; \
}
IFUNC_RESOLVE(memset)
diff --git a/sysdeps/s390/s390-32/multiarch/memcmp.S b/sysdeps/s390/s390-32/multiarch/memcmp.S
index f298baa2ac..584dc99792 100644
--- a/sysdeps/s390/s390-32/multiarch/memcmp.S
+++ b/sysdeps/s390/s390-32/multiarch/memcmp.S
@@ -1,5 +1,5 @@
/* CPU specific memcmp implementations. 32 bit S/390 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 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
@@ -27,9 +27,9 @@
.text
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
-ENTRY(memcmp_z196)
+ENTRY(__memcmp_z196)
.machine "z196"
.machinemode "zarch_nohighgprs"
ltr %r4,%r4
@@ -61,9 +61,9 @@ ENTRY(memcmp_z196)
br %r14
.L_Z196_14:
clc 0(1,%r3),0(%r2)
-END(memcmp_z196)
+END(__memcmp_z196)
-ENTRY(memcmp_z10)
+ENTRY(__memcmp_z10)
.machine "z10"
.machinemode "zarch_nohighgprs"
ltr %r4,%r4
@@ -90,15 +90,15 @@ ENTRY(memcmp_z10)
j .L_Z10_3
.L_Z10_15:
clc 0(1,%r3),0(%r2)
-END(memcmp_z10)
+END(__memcmp_z10)
#endif
#include "../memcmp.S"
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
.globl memcmp
-.set memcmp,memcmp_g5
+.set memcmp,__memcmp_g5
.weak bcmp
-.set bcmp,memcmp_g5
+.set bcmp,__memcmp_g5
#endif
diff --git a/sysdeps/s390/s390-32/multiarch/memcpy.S b/sysdeps/s390/s390-32/multiarch/memcpy.S
index 78ed7379cd..51f4fcff15 100644
--- a/sysdeps/s390/s390-32/multiarch/memcpy.S
+++ b/sysdeps/s390/s390-32/multiarch/memcpy.S
@@ -1,5 +1,5 @@
/* CPU specific memcpy implementations. 32 bit S/390 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 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
@@ -27,9 +27,9 @@
.text
-#if defined SHARED && !defined NOT_IN_libc
+#if defined SHARED && IS_IN (libc)
-ENTRY(memcpy_z196)
+ENTRY(__memcpy_z196)
.machine "z196"
.machinemode "zarch_nohighgprs"
llgfr %r4,%r4
@@ -46,7 +46,7 @@ ENTRY(memcpy_z196)
br %r14
.L_Z196_5:
cgfi %r5,262144 # Switch to mvcle for copies >64MB
- jh memcpy_mvcle
+ jh __memcpy_mvcle
.L_Z196_2:
pfd 1,768(%r3)
pfd 2,768(%r1)
@@ -58,9 +58,9 @@ ENTRY(memcpy_z196)
j .L_Z196_3
.L_Z196_14:
mvc 0(1,%r1),0(%r3)
-END(memcpy_z196)
+END(__memcpy_z196)
-ENTRY(memcpy_z10)
+ENTRY(__memcpy_z10)
.machine "z10"
.machinemode "zarch_nohighgprs"
llgfr %r4,%r4
@@ -75,7 +75,7 @@ ENTRY(memcpy_z10)
br %r14
.L_Z10_13:
cgfi %r5,65535 # Switch to mvcle for copies >16MB
- jh memcpy_mvcle
+ jh __memcpy_mvcle
.L_Z10_12:
pfd 1,768(%r3)
pfd 2,768(%r1)
@@ -86,13 +86,13 @@ ENTRY(memcpy_z10)
j .L_Z10_3
.L_Z10_15:
mvc 0(1,%r1),0(%r3)
-END(memcpy_z10)
+END(__memcpy_z10)
#endif
#include "../memcpy.S"
-#if !defined SHARED || defined NOT_IN_libc
+#if !defined SHARED || !IS_IN (libc)
.globl memcpy
-.set memcpy,memcpy_g5
+.set memcpy,__memcpy_g5
#endif
diff --git a/sysdeps/s390/s390-32/multiarch/memset.S b/sysdeps/s390/s390-32/multiarch/memset.S
index 99d7df0dd2..1a7b45f369 100644
--- a/sysdeps/s390/s390-32/multiarch/memset.S
+++ b/sysdeps/s390/s390-32/multiarch/memset.S
@@ -1,5 +1,5 @@
/* Set a block of memory to some byte value. 32 bit S/390 version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 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
@@ -27,9 +27,9 @@
.text
-#ifndef NOT_IN_libc
+#if IS_IN (libc)
-ENTRY(memset_z196)
+ENTRY(__memset_z196)
.machine "z196"
.machinemode "zarch_nohighgprs"
llgfr %r4,%r4
@@ -49,7 +49,7 @@ ENTRY(memset_z196)
br %r14
.L_Z196_1:
cgfi %r5,1048576
- jh memset_mvcle # Switch to mvcle for >256MB
+ jh __memset_mvcle # Switch to mvcle for >256MB
.L_Z196_2:
pfd 2,1024(%r1)
mvc 1(256,%r1),0(%r1)
@@ -59,9 +59,9 @@ ENTRY(memset_z196)
j .L_Z196_3
.L_Z196_17:
mvc 1(1,%r1),0(%r1)
-END(memset_z196)
+END(__memset_z196)
-ENTRY(memset_z10)
+ENTRY(__memset_z10)
.machine "z10"
.machinemode "zarch_nohighgprs"
llgfr %r4,%r4
@@ -78,7 +78,7 @@ ENTRY(memset_z10)
br %r14
.L_Z10_15:
cgfi %r5,163840 # Switch to mvcle for >40MB
- jh memset_mvcle
+ jh __memset_mvcle
.L_Z10_14:
pfd 2,1024(%r1)
mvc 1(256,%r1),0(%r1)
@@ -87,9 +87,9 @@ ENTRY(memset_z10)
j .L_Z10_3
.L_Z10_18:
mvc 1(1,%r1),0(%r1)
-END(memset_z10)
+END(__memset_z10)
-ENTRY(memset_mvcle)
+ENTRY(__memset_mvcle)
ahi %r4,2 # take back the change done by the caller
lr %r0,%r2 # save source address
lr %r1,%r3 # move pad byte to R1
@@ -101,13 +101,13 @@ ENTRY(memset_mvcle)
lr %r2,%r0 # return value is source address
.L1:
br %r14
-END(memset_mvcle)
+END(__memset_mvcle)
#endif
#include "../memset.S"
-#ifdef NOT_IN_libc
+#if !IS_IN (libc)
.globl memset
-.set memset,memset_g5
+.set memset,__memset_g5
#endif
diff --git a/sysdeps/s390/s390-32/s390-mcount.S b/sysdeps/s390/s390-32/s390-mcount.S
index 17668709ca..cc70641621 100644
--- a/sysdeps/s390/s390-32/s390-mcount.S
+++ b/sysdeps/s390/s390-32/s390-mcount.S
@@ -1,5 +1,5 @@
/* S/390-specific implemetation of profiling support.
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 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/s390/s390-32/setjmp-common.S b/sysdeps/s390/s390-32/setjmp-common.S
deleted file mode 100644
index d7bb720454..0000000000
--- a/sysdeps/s390/s390-32/setjmp-common.S
+++ /dev/null
@@ -1,84 +0,0 @@
-/* setjmp for s390, ELF version.
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
- Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
- 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 <sysdep.h>
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
-
- /* We include the BSD entry points here as well but we make
- them weak. */
-ENTRY (setjmp)
- .weak C_SYMBOL_NAME (setjmp)
- lhi %r3,1 /* second argument of one */
- j 0f /* branch relativ to __sigsetjmp */
-END (setjmp)
-
- /* Binary compatibility entry point. */
-ENTRY(_setjmp)
- .weak C_SYMBOL_NAME (_setjmp)
- lhi %r3,0 /* second argument of zero */
- j 0f /* branch relativ to __sigsetjmp */
-END (_setjmp)
-libc_hidden_def (_setjmp)
-
-ENTRY(__setjmp)
- lhi %r3,0 /* second argument of zero */
- j 0f /* branch relativ to __sigsetjmp */
-END (__setjmp)
-
-ENTRY(__sigsetjmp)
-0:
-#ifdef PTR_MANGLE
- stm %r6,%r13,0(%r2) /* store registers in jmp_buf */
- lr %r4,%r14
- lr %r5,%r15
- PTR_MANGLE (%r4, %r1)
- PTR_MANGLE2 (%r5, %r1)
- stm %r4,%r5,32(%r2)
-#else
- stm %r6,%r15,0(%r2) /* store registers in jmp_buf */
-#endif
-#ifndef __V1_JMPBUF
- lhi %r4,0
- st %r4,56(%r2) /* Set __flags to 0. */
-#endif
- std %f4,40(%r2)
- std %f6,48(%r2)
-#if defined NOT_IN_libc && defined IS_IN_rtld
- /* In ld.so we never save the signal mask. */
- lhi %r2,0
- br %r14
-#elif defined PIC
- /* We cannot use the PLT, because it requires that %r12 be set, but
- we can't save and restore our caller's value. Instead, we do an
- indirect jump through the GOT. */
- basr %r1,0
-0: al %r1,1f-0b(0,%r1) /* get address of global offset table */
- /* get address of __sigjmp_save from got */
- l %r1,__sigjmp_save@GOT12(0,%r1)
- br %r1
-1: .long _GLOBAL_OFFSET_TABLE_ - 0b
-#else
- basr %r1,0
-0: l %r1,1f-0b(0,%r1) /* load address of __sigjmp_save */
- br %r1 /* tail-call __sigjmp_save */
-1: .long __sigjmp_save
-#endif
-END (__sigsetjmp)
diff --git a/sysdeps/s390/s390-32/setjmp.S b/sysdeps/s390/s390-32/setjmp.S
new file mode 100644
index 0000000000..e068a3cbfe
--- /dev/null
+++ b/sysdeps/s390/s390-32/setjmp.S
@@ -0,0 +1,115 @@
+/* setjmp for s390, ELF version.
+ Copyright (C) 2000-2015 Free Software Foundation, Inc.
+ Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
+ 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 <sysdep.h>
+#define _ASM
+#define _SETJMP_H
+#include <bits/setjmp.h>
+#include <shlib-compat.h>
+#include <stap-probe.h>
+
+#if !IS_IN (rtld)
+# if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
+ /* we need a unique name in case of symbol versioning. */
+# define __sigsetjmp __v1__sigsetjmp
+# endif /* if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) */
+#endif /* !IS_IN (rtld) */
+
+ /* We include the BSD entry points here as well but we make
+ them weak. */
+ENTRY (setjmp)
+ .weak C_SYMBOL_NAME (setjmp)
+ lhi %r3,1 /* second argument of one */
+ j .Linternal_sigsetjmp /* branch relativ to __sigsetjmp */
+END (setjmp)
+
+ /* Binary compatibility entry point. */
+ENTRY(_setjmp)
+ .weak C_SYMBOL_NAME (_setjmp)
+ lhi %r3,0 /* second argument of zero */
+ j .Linternal_sigsetjmp /* branch relativ to __sigsetjmp */
+END (_setjmp)
+libc_hidden_def (_setjmp)
+
+ENTRY(__setjmp)
+ lhi %r3,0 /* second argument of zero */
+ j .Linternal_sigsetjmp /* branch relativ to __sigsetjmp */
+END (__setjmp)
+
+ENTRY(__sigsetjmp)
+.Linternal_sigsetjmp:
+ /* setjmp probe expects sig/setjmp first argument (4@%r2), second
+ argument (-4@%r3) and target address (4@%r14). */
+ LIBC_PROBE (setjmp, 3, 4@%r2, -4@%r3, 4@%r14)
+#ifdef PTR_MANGLE
+ stm %r6,%r13,0(%r2) /* store registers in jmp_buf */
+ lr %r4,%r14
+ lr %r5,%r15
+ PTR_MANGLE (%r4, %r1)
+ PTR_MANGLE2 (%r5, %r1)
+ stm %r4,%r5,32(%r2)
+#else
+ stm %r6,%r15,0(%r2) /* store registers in jmp_buf */
+#endif
+ std %f4,40(%r2)
+ std %f6,48(%r2)
+#if IS_IN (rtld)
+ /* In ld.so we never save the signal mask. */
+ lhi %r2,0
+ br %r14
+#elif defined PIC
+ /* We cannot use the PLT, because it requires that %r12 be set, but
+ we can't save and restore our caller's value. Instead, we do an
+ indirect jump through the GOT. */
+ basr %r1,0
+.L0: al %r1,.L1 - .L0(0,%r1) /* get address of global offset table */
+ /* get address of __sigjmp_save from got */
+ l %r1,__sigjmp_save@GOT(%r1)
+ br %r1
+.L1: .long _GLOBAL_OFFSET_TABLE_ - .L0
+#else
+ basr %r1,0
+.L0: l %r1,.L1-.L0(0,%r1) /* load address of __sigjmp_save */
+ br %r1 /* tail-call __sigjmp_save */
+.L1: .long __sigjmp_save
+#endif
+END (__sigsetjmp)
+
+#if !IS_IN (rtld)
+# if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20)
+/* In glibc release 2.19 new versions of setjmp-functions were introduced,
+ but were reverted before 2.20. Thus both versions are the same function. */
+
+# undef __sigsetjmp
+
+weak_alias (setjmp, __v1setjmp);
+weak_alias (setjmp, __v2setjmp);
+versioned_symbol (libc, __v1setjmp, setjmp, GLIBC_2_0);
+compat_symbol (libc, __v2setjmp, setjmp, GLIBC_2_19);
+
+weak_alias (_setjmp, __v1_setjmp);
+weak_alias (_setjmp, __v2_setjmp);
+versioned_symbol (libc, __v1_setjmp, _setjmp, GLIBC_2_0);
+compat_symbol (libc, __v2_setjmp, _setjmp, GLIBC_2_19);
+
+strong_alias (__v1__sigsetjmp, __v2__sigsetjmp);
+versioned_symbol (libc, __v1__sigsetjmp, __sigsetjmp, GLIBC_2_0);
+compat_symbol (libc, __v2__sigsetjmp, __sigsetjmp, GLIBC_2_19);
+# endif /* if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_19, GLIBC_2_20) */
+#endif /* if !IS_IN (rtld) */
diff --git a/sysdeps/s390/s390-32/start.S b/sysdeps/s390/s390-32/start.S
index 6d0f819c67..7d3c6d9a89 100644
--- a/sysdeps/s390/s390-32/start.S
+++ b/sysdeps/s390/s390-32/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF s390 ABI.
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 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/s390/s390-32/strcmp.S b/sysdeps/s390/s390-32/strcmp.S
index 7a95032f4c..109de12deb 100644
--- a/sysdeps/s390/s390-32/strcmp.S
+++ b/sysdeps/s390/s390-32/strcmp.S
@@ -1,6 +1,6 @@
/* strcmp - compare two string. S/390 version.
This file is part of the GNU C Library.
- Copyright (C) 2001-2014 Free Software Foundation, Inc.
+ Copyright (C) 2001-2015 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/s390/s390-32/strcpy.S b/sysdeps/s390/s390-32/strcpy.S
index da6fa538e7..b8b9b5f34b 100644
--- a/sysdeps/s390/s390-32/strcpy.S
+++ b/sysdeps/s390/s390-32/strcpy.S
@@ -1,6 +1,6 @@
/* strcpy - copy a string from source to destination. For IBM S390
This file is part of the GNU C Library.
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/s390/s390-32/strncpy.S b/sysdeps/s390/s390-32/strncpy.S
index 5157bc783c..b0e234e2da 100644
--- a/sysdeps/s390/s390-32/strncpy.S
+++ b/sysdeps/s390/s390-32/strncpy.S
@@ -1,7 +1,7 @@
/* strncpy - copy at most n characters from a string from source to
destination. For IBM S390
This file is part of the GNU C Library.
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/s390/s390-32/sub_n.S b/sysdeps/s390/s390-32/sub_n.S
index e0fbef7dc9..3ade1fe86d 100644
--- a/sysdeps/s390/s390-32/sub_n.S
+++ b/sysdeps/s390/s390-32/sub_n.S
@@ -1,6 +1,6 @@
/* __mpn_sub_n -- Add two limb vectors of the same length > 0 and store
sum in a third limb vector.
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU MP Library.
diff --git a/sysdeps/s390/s390-32/sysdep.h b/sysdeps/s390/s390-32/sysdep.h
index 67a43da7b3..779f1799b3 100644
--- a/sysdeps/s390/s390-32/sysdep.h
+++ b/sysdeps/s390/s390-32/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for s390.
- Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 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/s390/s390-32/tst-audit.h b/sysdeps/s390/s390-32/tst-audit.h
index 122984eeb6..27bc11343f 100644
--- a/sysdeps/s390/s390-32/tst-audit.h
+++ b/sysdeps/s390/s390-32/tst-audit.h
@@ -1,6 +1,6 @@
/* Definitions for testing PLT entry/exit auditing. S/390 32-bit version.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.