diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-03-25 02:28:16 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-03-25 02:28:16 +0100 |
commit | bf8c09f8484522144b4dddd9cf74efbd998e8f8f (patch) | |
tree | 8d85e1359a3f8c19adaf9bf7f2eeed5a5393ecd7 /sysdeps/s390/s390-64 | |
parent | 2bfa087aa11717761246f52b96c50454c3e4004e (diff) | |
parent | 58695b88a9deaecbcf7794760cc333177edaa2b4 (diff) |
Merge commit 'refs/top-bases/t/ifaddrs_v6' into t/ifaddrs_v6
Diffstat (limited to 'sysdeps/s390/s390-64')
34 files changed, 129 insertions, 96 deletions
diff --git a/sysdeps/s390/s390-64/__longjmp.c b/sysdeps/s390/s390-64/__longjmp-common.c index 4719d9c83d..46cabb67bc 100644 --- a/sysdeps/s390/s390-64/__longjmp.c +++ b/sysdeps/s390/s390-64/__longjmp-common.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2005, 2009, 2010 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). @@ -25,7 +25,7 @@ /* Jump to the position specified by ENV, causing the setjmp call there to return VAL, or 1 if VAL is 0. */ -void +attribute_hidden void __longjmp (__jmp_buf env, int val) { #ifdef PTR_DEMANGLE @@ -42,10 +42,14 @@ __longjmp (__jmp_buf env, int val) register void *r1 __asm ("%r1") = (void *) env; #endif /* Restore registers and jump back. */ - asm volatile ("ld %%f7,104(%1)\n\t" - "ld %%f5,96(%1)\n\t" - "ld %%f3,88(%1)\n\t" - "ld %%f1,80(%1)\n\t" + asm volatile ("ld %%f8,80(%1)\n\t" + "ld %%f9,88(%1)\n\t" + "ld %%f10,96(%1)\n\t" + "ld %%f11,104(%1)\n\t" + "ld %%f12,112(%1)\n\t" + "ld %%f13,120(%1)\n\t" + "ld %%f14,128(%1)\n\t" + "ld %%f15,136(%1)\n\t" #ifdef PTR_DEMANGLE "lmg %%r6,%%r13,0(%1)\n\t" "lmg %%r4,%%r5,64(%1)\n\t" diff --git a/sysdeps/s390/s390-64/add_n.S b/sysdeps/s390/s390-64/add_n.S index 62baf69e74..6bbd61db9a 100644 --- a/sysdeps/s390/s390-64/add_n.S +++ b/sysdeps/s390/s390-64/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) 2001 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 MP Library. diff --git a/sysdeps/s390/s390-64/backtrace.c b/sysdeps/s390/s390-64/backtrace.c index 562d461f97..39a15e0f0f 100644 --- a/sysdeps/s390/s390-64/backtrace.c +++ b/sysdeps/s390/s390-64/backtrace.c @@ -1,5 +1,5 @@ /* Return backtrace of current program state. 64 bit S/390 version. - Copyright (C) 2001, 2003, 2004, 2005 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/s390/s390-64/bcopy.S b/sysdeps/s390/s390-64/bcopy.S index 5b0a0322e6..fdfbfdfb0b 100644 --- a/sysdeps/s390/s390-64/bcopy.S +++ b/sysdeps/s390/s390-64/bcopy.S @@ -1,6 +1,6 @@ /* bcopy -- copy a block from source to destination. 64 bit S/390 version. This file is part of the GNU C Library. - Copyright (C) 2000, 2001, 2005 Free Software Foundation, Inc. + Copyright (C) 2000-2014 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-64/bzero.S b/sysdeps/s390/s390-64/bzero.S index 59ce49cff5..4d0527aee9 100644 --- a/sysdeps/s390/s390-64/bzero.S +++ b/sysdeps/s390/s390-64/bzero.S @@ -1,6 +1,6 @@ /* bzero -- set a block of memory to zero. 64 bit S/390 version. This file is part of the GNU C Library. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001-2014 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-64/configure b/sysdeps/s390/s390-64/configure index 669bb9be5c..024565f85a 100644 --- a/sysdeps/s390/s390-64/configure +++ b/sysdeps/s390/s390-64/configure @@ -1,4 +1,4 @@ -# This file is generated from configure.in by Autoconf. DO NOT EDIT! +# 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-64/configure.in b/sysdeps/s390/s390-64/configure.ac index b5af4e12fc..b5af4e12fc 100644 --- a/sysdeps/s390/s390-64/configure.in +++ b/sysdeps/s390/s390-64/configure.ac diff --git a/sysdeps/s390/s390-64/crti.S b/sysdeps/s390/s390-64/crti.S index 7605f2dccf..c13c18bbf6 100644 --- a/sysdeps/s390/s390-64/crti.S +++ b/sysdeps/s390/s390-64/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for 64 bit S/390. - Copyright (C) 2001, 2012 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/s390/s390-64/crtn.S b/sysdeps/s390/s390-64/crtn.S index bf72d564c1..399d3ceff8 100644 --- a/sysdeps/s390/s390-64/crtn.S +++ b/sysdeps/s390/s390-64/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for 64 bit S/390. - Copyright (C) 2001, 2012 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/s390/s390-64/dl-machine.h b/sysdeps/s390/s390-64/dl-machine.h index 067336e2a6..e919223c6a 100644 --- a/sysdeps/s390/s390-64/dl-machine.h +++ b/sysdeps/s390/s390-64/dl-machine.h @@ -1,6 +1,6 @@ /* Machine-dependent ELF dynamic relocation inline functions. 64 bit S/390 Version. - Copyright (C) 2001-2012 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. @@ -361,8 +361,7 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, strtab = (const char *) D_PTR (map,l_info[DT_STRTAB]); _dl_error_printf ("\ %s: Symbol `%s' has different size in shared object, consider re-linking\n", - rtld_progname ?: "<program name unknown>", - strtab + refsym->st_name); + RTLD_PROGNAME, strtab + refsym->st_name); } memcpy (reloc_addr_arg, (void *) value, MIN (sym->st_size, refsym->st_size)); diff --git a/sysdeps/s390/s390-64/dl-trampoline.S b/sysdeps/s390/s390-64/dl-trampoline.S index 9e704e9207..87c6d50ced 100644 --- a/sysdeps/s390/s390-64/dl-trampoline.S +++ b/sysdeps/s390/s390-64/dl-trampoline.S @@ -1,5 +1,5 @@ -/* PLT trampolines. s390 version. - Copyright (C) 2005 Free Software Foundation, Inc. +/* PLT trampolines. s390x version. + Copyright (C) 2005-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 @@ -20,8 +20,8 @@ * with the following linkage: * r2 - r6 : parameter registers * f0, f2, f4, f6 : floating point parameter registers - * 24(r15), 28(r15) : PLT arguments PLT1, PLT2 - * 96(r15) : additional stack parameters + * 48(r15), 56(r15) : PLT arguments PLT1, PLT2 + * 160(r15) : additional stack parameters * The normal clobber rules for function calls apply: * r0 - r5 : call clobbered * r6 - r13 : call saved @@ -39,21 +39,21 @@ cfi_startproc .align 16 _dl_runtime_resolve: - stmg 2,5,64(15) # save registers - stg 14,96(15) + stmg %r2,%r5,64(15) # save call-clobbered argument registers + stg %r14,96(15) cfi_offset (r14, -64) - lgr 0,15 # create stack frame - aghi 15,-160 + lgr %r0,%r15 + aghi %r15,-160 # create stack frame cfi_adjust_cfa_offset (160) - stg 0,0(15) - lmg 2,3,208(15) # load args saved by PLT - brasl 14,_dl_fixup # call fixup - lgr 1,2 # function addr returned in r2 - aghi 15,160 # remove stack frame + stg %r0,0(%r15) # write backchain + lmg %r2,%r3,208(%r15)# load args saved by PLT + brasl %r14,_dl_fixup # call fixup + lgr %r1,%r2 # function addr returned in r2 + aghi %r15,160 # remove stack frame cfi_adjust_cfa_offset (-160) - lg 14,96(15) # restore registers - lmg 2,5,64(15) - br 1 + lg %r14,96(15) # restore registers + lmg %r2,%r5,64(15) + br %r1 cfi_endproc .size _dl_runtime_resolve, .-_dl_runtime_resolve @@ -64,13 +64,12 @@ _dl_runtime_resolve: cfi_startproc .align 16 _dl_runtime_profile: - stmg %r2,%r6,64(%r15) # save registers - std %f0,104(%r15) - std %f2,112(%r15) + stmg %r2,%r6,64(%r15) # save call-clobbered arg regs + std %f0,104(%r15) # + r6 needed as arg for + std %f2,112(%r15) # _dl_profile_fixup std %f4,120(%r15) std %f6,128(%r15) - stg %r6,16(%r15) - stg %r12,24(%r15) + stg %r12,24(%r15) # r12 is used as backup of r15 stg %r14,32(%r15) cfi_offset (r6, -96) cfi_offset (f0, -56) @@ -79,10 +78,10 @@ _dl_runtime_profile: cfi_offset (f6, -32) cfi_offset (r12, -136) cfi_offset (r14, -128) - lgr %r12,%r15 # create stack frame + lgr %r12,%r15 # backup stack pointer cfi_def_cfa_register (12) - aghi %r15,-160 - stg %r12,0(%r15) + aghi %r15,-160 # create stack frame + stg %r12,0(%r15) # save backchain lmg %r2,%r3,48(%r12) # load arguments saved by PLT lgr %r4,%r14 # return address as third parameter la %r5,64(%r12) # pointer to struct La_s390_32_regs @@ -92,18 +91,19 @@ _dl_runtime_profile: lg %r0,40(%r12) # load framesize ltgr %r0,%r0 jnm 1f - lmg %r2,%r6,64(%r12) - ld %f0,104(%r12) - ld %f2,112(%r12) + + lmg %r2,%r6,64(%r12) # framesize < 0 means no pltexit call + ld %f0,104(%r12) # so we can do a tail call without + ld %f2,112(%r12) # copying the arg overflow area ld %f4,120(%r12) ld %f6,128(%r12) - basr %r14,%r1 # call resolved function -0: lgr %r15,%r12 # remove stack frame + + lgr %r15,%r12 # remove stack frame cfi_def_cfa_register (15) lg %r14,32(%r15) # restore registers lg %r12,24(%r15) - lg %r6,16(%r15) - br %r14 + br %r1 # tail-call to resolved function + cfi_def_cfa_register (12) 1: jz 4f # framesize == 0 ? aghi %r0,7 # align framesize to 8 @@ -118,7 +118,7 @@ _dl_runtime_profile: la %r3,8(%r3) brctg %r0,3b 4: lmg %r2,%r6,64(%r12) # load register parameters - ld %f0,104(%r12) + ld %f0,104(%r12) # restore call-clobbered arg regs ld %f2,112(%r12) ld %f4,120(%r12) ld %f6,128(%r12) @@ -129,7 +129,13 @@ _dl_runtime_profile: la %r4,32(%r12) # pointer to struct La_s390_32_regs la %r5,72(%r12) # pointer to struct La_s390_32_retval brasl %r14,_dl_call_pltexit - j 0b + + lgr %r15,%r12 # remove stack frame + cfi_def_cfa_register (15) + lg %r14,32(%r15) # restore registers + lg %r12,24(%r15) + br %r14 + cfi_endproc .size _dl_runtime_profile, .-_dl_runtime_profile #endif diff --git a/sysdeps/s390/s390-64/iso-8859-1_cp037_z900.c b/sysdeps/s390/s390-64/iso-8859-1_cp037_z900.c index 58641f59d8..1c0bf29ad7 100644 --- a/sysdeps/s390/s390-64/iso-8859-1_cp037_z900.c +++ b/sysdeps/s390/s390-64/iso-8859-1_cp037_z900.c @@ -2,7 +2,7 @@ This module uses the Z900 variant of the Translate One To One instruction. - Copyright (C) 1997-2009 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. Author: Andreas Krebbel <Andreas.Krebbel@de.ibm.com> Based on the work by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/s390/s390-64/memchr.S b/sysdeps/s390/s390-64/memchr.S index 932d70bf3f..ebda569829 100644 --- a/sysdeps/s390/s390-64/memchr.S +++ b/sysdeps/s390/s390-64/memchr.S @@ -1,5 +1,5 @@ /* Search a character in a block of memory. 64 bit S/390 version. - Copyright (C) 2001, 2003 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/s390/s390-64/memcmp.S b/sysdeps/s390/s390-64/memcmp.S index e0b62e3a45..51b247526a 100644 --- a/sysdeps/s390/s390-64/memcmp.S +++ b/sysdeps/s390/s390-64/memcmp.S @@ -1,5 +1,5 @@ /* memcmp - compare two memory blocks. 64 bit S/390 version. - Copyright (C) 2012 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 @@ -17,7 +17,7 @@ <http://www.gnu.org/licenses/>. */ -#include "sysdep.h" +#include <sysdep.h> #include "asm-syntax.h" /* INPUT PARAMETERS diff --git a/sysdeps/s390/s390-64/memcpy.S b/sysdeps/s390/s390-64/memcpy.S index 1e5f050b8f..a7e2a744a3 100644 --- a/sysdeps/s390/s390-64/memcpy.S +++ b/sysdeps/s390/s390-64/memcpy.S @@ -1,5 +1,5 @@ /* memcpy - copy a block from source to destination. 64 bit S/390 version. - Copyright (C) 2012 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 @@ -17,7 +17,7 @@ <http://www.gnu.org/licenses/>. */ -#include "sysdep.h" +#include <sysdep.h> #include "asm-syntax.h" /* INPUT PARAMETERS diff --git a/sysdeps/s390/s390-64/memset.S b/sysdeps/s390/s390-64/memset.S index 6b3007bd91..791b81d433 100644 --- a/sysdeps/s390/s390-64/memset.S +++ b/sysdeps/s390/s390-64/memset.S @@ -1,5 +1,5 @@ /* Set a block of memory to some byte value. 64 bit S/390 version. - Copyright (C) 2001, 2003 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. @@ -18,7 +18,7 @@ <http://www.gnu.org/licenses/>. */ -#include "sysdep.h" +#include <sysdep.h> #include "asm-syntax.h" /* INPUT PARAMETERS diff --git a/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c b/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c index 5f56764909..f8c69ffbb8 100644 --- a/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c +++ b/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c @@ -1,6 +1,6 @@ /* IFUNC resolver function for CPU specific functions. 64 bit S/390 version. - Copyright (C) 2012 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 @@ -34,9 +34,9 @@ \ /* Make the declarations of the optimized functions hidden in order to prevent GOT slots being generated for them. */ \ - extern __attribute__((visibility("hidden"))) void *FUNC##_z196; \ - extern __attribute__((visibility("hidden"))) void *FUNC##_z10; \ - extern __attribute__((visibility("hidden"))) void *FUNC##_z900; \ + extern void *FUNC##_z196 attribute_hidden; \ + extern void *FUNC##_z10 attribute_hidden; \ + extern void *FUNC##_z900 attribute_hidden; \ \ void *resolve_##FUNC (unsigned long int dl_hwcap) \ { \ diff --git a/sysdeps/s390/s390-64/multiarch/memcmp.S b/sysdeps/s390/s390-64/multiarch/memcmp.S index f40a3c198e..c31d7c446c 100644 --- a/sysdeps/s390/s390-64/multiarch/memcmp.S +++ b/sysdeps/s390/s390-64/multiarch/memcmp.S @@ -1,5 +1,5 @@ /* CPU specific memcmp implementations. 64 bit S/390 version. - Copyright (C) 2012 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/s390/s390-64/multiarch/memcpy.S b/sysdeps/s390/s390-64/multiarch/memcpy.S index b00ffc132f..6590f43f27 100644 --- a/sysdeps/s390/s390-64/multiarch/memcpy.S +++ b/sysdeps/s390/s390-64/multiarch/memcpy.S @@ -1,5 +1,5 @@ /* CPU specific memcpy implementations. 64 bit S/390 version. - Copyright (C) 2012 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/s390/s390-64/multiarch/memset.S b/sysdeps/s390/s390-64/multiarch/memset.S index 1f9064d5f3..3b962696dd 100644 --- a/sysdeps/s390/s390-64/multiarch/memset.S +++ b/sysdeps/s390/s390-64/multiarch/memset.S @@ -1,5 +1,5 @@ /* Set a block of memory to some byte value. 64 bit S/390 version. - Copyright (C) 2012 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/s390/s390-64/s390x-mcount.S b/sysdeps/s390/s390-64/s390x-mcount.S index 3d43929892..a4364bd256 100644 --- a/sysdeps/s390/s390-64/s390x-mcount.S +++ b/sysdeps/s390/s390-64/s390x-mcount.S @@ -1,5 +1,5 @@ /* 64 bit S/390-specific implemetation of profiling support. - Copyright (C) 2001-2012 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. @@ -23,10 +23,10 @@ On the start of each function _mcount is called with the address of a data word in %r1 (initialized to 0, used for counting). The compiler with the option -p generates code of the form: - + STM 6,15,24(15) BRAS 13,.LTN0_0 - .LT0_0: + .LT0_0: .LC13: .long .LP0 .data .align 4 @@ -37,7 +37,7 @@ lg 1,.LC13-.LT0_0(13) brasl 14,_mcount lg 14,4(15) - + The _mcount implementation now has to call __mcount_internal with the address of .LP0 as first parameter and the return address as second parameter. &.LP0 was loaded to %r1 and the return address is in %r14. diff --git a/sysdeps/s390/s390-64/setjmp.S b/sysdeps/s390/s390-64/setjmp-common.S index cbf68bce53..9cdcae45c5 100644 --- a/sysdeps/s390/s390-64/setjmp.S +++ b/sysdeps/s390/s390-64/setjmp-common.S @@ -1,5 +1,5 @@ /* setjmp for 64 bit S/390, ELF version. - Copyright (C) 2001, 2002, 2005 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. @@ -27,24 +27,24 @@ ENTRY (setjmp) .weak C_SYMBOL_NAME (setjmp) lghi %r3,1 /* Second argument of one. */ - j .Linternal_sigsetjmp /* Branch relativ to __sigsetjmp. */ + j 0f /* Branch relativ to __sigsetjmp. */ END (setjmp) /* Binary compatibility entry point. */ ENTRY(_setjmp) .weak C_SYMBOL_NAME (_setjmp) slgr %r3,%r3 /* Second argument of zero. */ - j .Linternal_sigsetjmp /* Branch relativ to __sigsetjmp. */ -END (setjmp) + j 0f /* Branch relativ to __sigsetjmp. */ +END (_setjmp) libc_hidden_def (_setjmp) ENTRY(__setjmp) slgr %r3,%r3 /* Second argument of zero. */ - j .Linternal_sigsetjmp /* Branch relativ to __sigsetjmp. */ -END (setjmp) + j 0f /* Branch relativ to __sigsetjmp. */ +END (__setjmp) ENTRY(__sigsetjmp) -.Linternal_sigsetjmp: +0: #ifdef PTR_MANGLE stmg %r6,%r13,0(%r2) /* Store registers in jmp_buf. */ lgr %r4,%r14 @@ -55,10 +55,18 @@ ENTRY(__sigsetjmp) #else stmg %r6,%r15,0(%r2) /* Store registers in jmp_buf. */ #endif - std %f1,80(%r2) - std %f3,88(%r2) - std %f5,96(%r2) - std %f7,104(%r2) +#ifndef __V1_JMPBUF + lghi %r4,0 + stg %r4,144(%r2) /* Set __flags to 0. */ +#endif + std %f8,80(%r2) + std %f9,88(%r2) + std %f10,96(%r2) + std %f11,104(%r2) + std %f12,112(%r2) + std %f13,120(%r2) + std %f14,128(%r2) + std %f15,136(%r2) #if defined NOT_IN_libc && defined IS_IN_rtld /* In ld.so we never save the signal mask. */ lghi %r2,0 diff --git a/sysdeps/s390/s390-64/stackguard-macros.h b/sysdeps/s390/s390-64/stackguard-macros.h index 0cebb5f022..c8270fbe79 100644 --- a/sysdeps/s390/s390-64/stackguard-macros.h +++ b/sysdeps/s390/s390-64/stackguard-macros.h @@ -2,3 +2,17 @@ #define STACK_CHK_GUARD \ ({ uintptr_t x; asm ("ear %0,%%a0; sllg %0,%0,32; ear %0,%%a1; lg %0,0x28(%0)" : "=a" (x)); x; }) + +/* On s390/s390x there is no unique pointer guard, instead we use the + same value as the stack guard. */ +#define POINTER_CHK_GUARD \ + ({ \ + uintptr_t x; \ + asm ("ear %0,%%a0;" \ + "sllg %0,%0,32;" \ + "ear %0,%%a1;" \ + "lg %0,%1(%0)" \ + : "=a" (x) \ + : "i" (offsetof (tcbhead_t, stack_guard))); \ + x; \ + }) diff --git a/sysdeps/s390/s390-64/start.S b/sysdeps/s390/s390-64/start.S index 6256f97292..5dcdbc4160 100644 --- a/sysdeps/s390/s390-64/start.S +++ b/sysdeps/s390/s390-64/start.S @@ -1,5 +1,5 @@ /* Startup code compliant to the 64 bit S/390 ELF ABI. - Copyright (C) 2001, 2002, 2003, 2004, 2006 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/s390/s390-64/strcmp.S b/sysdeps/s390/s390-64/strcmp.S index 2ce87e4919..7e7380649e 100644 --- a/sysdeps/s390/s390-64/strcmp.S +++ b/sysdeps/s390/s390-64/strcmp.S @@ -1,6 +1,6 @@ /* strcmp - compare two string. 64 bit S/390 version. This file is part of the GNU C Library. - Copyright (C) 2001, 2003 Free Software Foundation, Inc. + Copyright (C) 2001-2014 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-64/strcpy.S b/sysdeps/s390/s390-64/strcpy.S index ecbab8c30c..72c2de2d5d 100644 --- a/sysdeps/s390/s390-64/strcpy.S +++ b/sysdeps/s390/s390-64/strcpy.S @@ -1,5 +1,5 @@ /* strcpy - copy a string from source to destination. 64 bit S/390 version. - Copyright (C) 2001, 2003 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/s390/s390-64/strncpy.S b/sysdeps/s390/s390-64/strncpy.S index 22f5466598..9d2dc861fe 100644 --- a/sysdeps/s390/s390-64/strncpy.S +++ b/sysdeps/s390/s390-64/strncpy.S @@ -1,6 +1,6 @@ /* strncpy - copy at most n characters from a string from source to destination. 64 bit S/390 version - Copyright (C) 2001, 2003 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/s390/s390-64/sub_n.S b/sysdeps/s390/s390-64/sub_n.S index 0956cb7339..65223d0050 100644 --- a/sysdeps/s390/s390-64/sub_n.S +++ b/sysdeps/s390/s390-64/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. 64 bit S/390 version. - Copyright (C) 2001 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 MP Library. @@ -23,7 +23,7 @@ %r3 = s1_ptr %r4 = s2_ptr %r5 = size. */ - + #include "sysdep.h" #include "asm-syntax.h" diff --git a/sysdeps/s390/s390-64/sysdep.h b/sysdeps/s390/s390-64/sysdep.h index e62191c2a2..0d45ceff1e 100644 --- a/sysdeps/s390/s390-64/sysdep.h +++ b/sysdeps/s390/s390-64/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for 64 bit S/390. - Copyright (C) 2001, 2003, 2012 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. @@ -63,6 +63,7 @@ #define syscall_error __syscall_error #define mcount _mcount +#undef PSEUDO #define PSEUDO(name, syscall_name, args) \ lose: SYSCALL_PIC_SETUP \ jg JUMPTARGET(syscall_error); \ diff --git a/sysdeps/s390/s390-64/tls-macros.h b/sysdeps/s390/s390-64/tls-macros.h index be8aa6cde0..3c59436341 100644 --- a/sysdeps/s390/s390-64/tls-macros.h +++ b/sysdeps/s390/s390-64/tls-macros.h @@ -8,12 +8,13 @@ #ifdef PIC # define TLS_IE(x) \ - ({ unsigned long __offset; \ - asm ("bras %0,1f\n" \ - "0:\t.quad " #x "@gotntpoff\n" \ - "1:\tlg %0,0(%0)\n\t" \ - "lg %0,0(%0,%%r12):tls_load:" #x \ - : "=&a" (__offset) : : "cc" ); \ + ({ unsigned long __offset, __got; \ + asm ("bras %0,0f\n\t" \ + ".quad " #x "@gotntpoff\n" \ + "0:\tlarl %1,_GLOBAL_OFFSET_TABLE_\n\t" \ + "lg %0,0(%0)\n\t" \ + "lg %0,0(%0,%1):tls_load:" #x "\n" \ + : "=&a" (__offset), "=&a" (__got) : : "cc" ); \ (int *) (__builtin_thread_pointer() + __offset); }) #else # define TLS_IE(x) \ diff --git a/sysdeps/s390/s390-64/tst-audit.h b/sysdeps/s390/s390-64/tst-audit.h index 3b4fac4fc0..05edc7d5b7 100644 --- a/sysdeps/s390/s390-64/tst-audit.h +++ b/sysdeps/s390/s390-64/tst-audit.h @@ -1,6 +1,6 @@ /* Definitions for testing PLT entry/exit auditing. S/390 64-bit version. - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/s390/s390-64/utf16-utf32-z9.c b/sysdeps/s390/s390-64/utf16-utf32-z9.c index 9eaa1a56f4..f7d9e07957 100644 --- a/sysdeps/s390/s390-64/utf16-utf32-z9.c +++ b/sysdeps/s390/s390-64/utf16-utf32-z9.c @@ -2,7 +2,7 @@ This module uses the Z9-109 variants of the Convert Unicode instructions. - Copyright (C) 1997-2009 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. Author: Andreas Krebbel <Andreas.Krebbel@de.ibm.com> Based on the work by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/s390/s390-64/utf8-utf16-z9.c b/sysdeps/s390/s390-64/utf8-utf16-z9.c index 9f5917769f..863677455c 100644 --- a/sysdeps/s390/s390-64/utf8-utf16-z9.c +++ b/sysdeps/s390/s390-64/utf8-utf16-z9.c @@ -2,7 +2,7 @@ This module uses the Z9-109 variants of the Convert Unicode instructions. - Copyright (C) 1997-2009 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. Author: Andreas Krebbel <Andreas.Krebbel@de.ibm.com> Based on the work by Ulrich Drepper <drepper@cygnus.com>, 1997. diff --git a/sysdeps/s390/s390-64/utf8-utf32-z9.c b/sysdeps/s390/s390-64/utf8-utf32-z9.c index a80798028c..5120837037 100644 --- a/sysdeps/s390/s390-64/utf8-utf32-z9.c +++ b/sysdeps/s390/s390-64/utf8-utf32-z9.c @@ -2,7 +2,7 @@ This module uses the Z9-109 variants of the Convert Unicode instructions. - Copyright (C) 1997-2009 Free Software Foundation, Inc. + Copyright (C) 1997-2014 Free Software Foundation, Inc. Author: Andreas Krebbel <Andreas.Krebbel@de.ibm.com> Based on the work by Ulrich Drepper <drepper@cygnus.com>, 1997. |