diff options
author | Andreas Jaeger <aj@suse.de> | 2012-03-07 08:55:31 +0100 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2012-03-07 08:55:31 +0100 |
commit | 580716898d5e80784f1993a0129d1b821bc6e3bf (patch) | |
tree | c346faaab5b1f4005f3c0dd8f16ba701a30ad541 /sysdeps/unix | |
parent | 625d134f42d65ebc0349c03a0d9592400e86d084 (diff) | |
parent | 3bd2c723160f04b1c151daffb8f6596dbd633f5e (diff) | |
download | glibc-580716898d5e80784f1993a0129d1b821bc6e3bf.zip glibc-580716898d5e80784f1993a0129d1b821bc6e3bf.tar.gz glibc-580716898d5e80784f1993a0129d1b821bc6e3bf.tar.bz2 |
Merge branch 'master' into bug13658-branch
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/sysv/linux/dl-osinfo.h | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c | 45 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h | 26 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sparc64/____longjmp_chk.S | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sparc64/brk.S | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h | 26 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/gettimeofday.c | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/init-first.c | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/time.c | 2 |
10 files changed, 10 insertions, 123 deletions
diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h index 874660b..780b20a 100644 --- a/sysdeps/unix/sysv/linux/dl-osinfo.h +++ b/sysdeps/unix/sysv/linux/dl-osinfo.h @@ -84,8 +84,8 @@ _dl_setup_stack_chk_guard (void *dl_random) return ret.num; } # endif - ret.bytes[filllen - 2] = 255; - ret.bytes[filllen - 3] = '\n'; + ret.bytes[filllen] = 255; + ret.bytes[filllen - 1] = '\n'; } else #endif diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S b/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S index 7246e89..0b3361b 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/____longjmp_chk.S @@ -67,15 +67,9 @@ ENTRY (____longjmp_chk) or %o0, %lo(longjmp_msg), %o0 #else SETUP_PIC_REG(l7) -#ifdef HAVE_BINUTILS_GOTDATA sethi %gdop_hix22(longjmp_msg), %o0 xor %o0, %gdop_lox10(longjmp_msg), %o0 ld [%l7 + %o0], %o0, %gdop(longjmp_msg) -#else - sethi %hi(longjmp_msg), %o0 - or %o0, %lo(longjmp_msg), %o0 - ld [%l7 + %o0], %o0 -#endif #endif call HIDDEN_JUMPTARGET(__fortify_fail) nop diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c b/sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c deleted file mode 100644 index c30d8e0..0000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 1997, 2002, 2003, 2004 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 <unistd.h> -#include <sys/param.h> -#include <ldsodefs.h> -#include <sysdep.h> - -/* Return the system page size. This value will either be 4k or 8k depending - on whether or not we are running on Sparc v9 machine. */ - -/* If we are not a static program, this value is collected from the system - via the AT_PAGESZ auxiliary argument. If we are a static program, we - use the getpagesize system call. */ - -int -__getpagesize () -{ - int ret = GLRO(dl_pagesize); - if (ret == 0) - { - INTERNAL_SYSCALL_DECL (err); - ret = INTERNAL_SYSCALL (getpagesize, err, 0); -#ifndef SHARED - GLRO(dl_pagesize) = ret; -#endif - } - return ret; -} -libc_hidden_def (__getpagesize) -weak_alias (__getpagesize, getpagesize) diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h index 3d6042e..3424598 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h @@ -88,8 +88,7 @@ ENTRY(name); \ mov %g1, %o7; #else # if RTLD_PRIVATE_ERRNO -# ifdef HAVE_BINUTILS_GOTDATA -# define SYSCALL_ERROR_HANDLER \ +# define SYSCALL_ERROR_HANDLER \ 0: SETUP_PIC_REG_LEAF(o2,g1) \ sethi %gdop_hix22(rtld_errno), %g1; \ xor %g1, %gdop_lox10(rtld_errno), %g1;\ @@ -97,16 +96,6 @@ ENTRY(name); \ st %o0, [%g1]; \ jmp %o7 + 8; \ mov -1, %o0; -# else -# define SYSCALL_ERROR_HANDLER \ -0: SETUP_PIC_REG_LEAF(o2,g1) \ - sethi %hi(rtld_errno), %g1; \ - or %g1, %lo(rtld_errno), %g1; \ - ld [%o2 + %g1], %g1; \ - st %o0, [%g1]; \ - jmp %o7 + 8; \ - mov -1, %o0; -# endif # elif defined _LIBC_REENTRANT # ifndef NOT_IN_libc @@ -123,8 +112,7 @@ ENTRY(name); \ jmp %o7 + 8; \ mov -1, %o0; # else -# ifdef HAVE_BINUTILS_GOTDATA -# define SYSCALL_ERROR_HANDLER \ +# define SYSCALL_ERROR_HANDLER \ 0: SETUP_PIC_REG_LEAF(o2,g1) \ sethi %gdop_hix22(errno), %g1;\ xor %g1, %gdop_lox10(errno), %g1;\ @@ -132,16 +120,6 @@ ENTRY(name); \ st %o0, [%g1]; \ jmp %o7 + 8; \ mov -1, %o0; -# else -# define SYSCALL_ERROR_HANDLER \ -0: SETUP_PIC_REG_LEAF(o2,g1) \ - sethi %hi(errno), %g1; \ - or %g1, %lo(errno), %g1; \ - ld [%o2 + %g1], %g1; \ - st %o0, [%g1]; \ - jmp %o7 + 8; \ - mov -1, %o0; -# endif # endif /* _LIBC_REENTRANT */ #endif /* PIC */ diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/sparc/sparc64/____longjmp_chk.S index 69cf5ac..9b4e1e7 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/____longjmp_chk.S @@ -67,15 +67,9 @@ ENTRY (____longjmp_chk) or %o0, %lo(longjmp_msg), %o0 #else SETUP_PIC_REG(l7) -#ifdef HAVE_BINUTILS_GOTDATA sethi %gdop_hix22(longjmp_msg), %o0 xor %o0, %gdop_lox10(longjmp_msg), %o0 ldx [%l7 + %o0], %o0, %gdop(longjmp_msg) -#else - sethi %hi(longjmp_msg), %o0 - or %o0, %lo(longjmp_msg), %o0 - ldx [%l7 + %o0], %o0 -#endif #endif call HIDDEN_JUMPTARGET(__fortify_fail) nop diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S b/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S index a89d877..14b2967 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/brk.S @@ -64,15 +64,9 @@ ENTRY (__brk) sethi %hi(__curbrk), %g1 or %g1, %lo(__curbrk), %g1 #else -#ifdef HAVE_BINUTILS_GOTDATA sethi %gdop_hix22(__curbrk), %g1 xor %g1, %gdop_lox10(__curbrk), %g1 ldx [%l7 + %g1], %g1, %gdop(__curbrk) -#else - sethi %hi(__curbrk), %g1 - or %g1, %lo(__curbrk), %g1 - ldx [%l7 + %g1], %g1 -#endif #endif stx %o0, [%g1] mov %g0, %i0 @@ -89,15 +83,9 @@ ENTRY (__brk) sethi %hi(errno), %g1 or %g1, %lo(errno), %g1 #else -#ifdef HAVE_BINUTILS_GOTDATA sethi %gdop_hix22(errno), %g1 xor %g1, %gdop_lox10(errno), %g1 ldx [%l7 + %g1], %g1, %gdop(errno) -#else - sethi %hi(errno), %g1 - or %g1, %lo(errno), %g1 - ldx [%l7 + %g1], %g1 -#endif #endif st %o0, [%g1] #else diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h index 33e1a41..1bf7597 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h @@ -95,8 +95,7 @@ ENTRY(name); \ mov %g1, %o7; #else # if RTLD_PRIVATE_ERRNO -# ifdef HAVE_BINUTILS_GOTDATA -# define SYSCALL_ERROR_HANDLER \ +# define SYSCALL_ERROR_HANDLER \ 0: SETUP_PIC_REG_LEAF(o2,g1) \ sethi %gdop_hix22(rtld_errno), %g1; \ xor %g1, %gdop_lox10(rtld_errno), %g1;\ @@ -104,16 +103,6 @@ ENTRY(name); \ st %o0, [%g1]; \ jmp %o7 + 8; \ mov -1, %o0; -# else -# define SYSCALL_ERROR_HANDLER \ -0: SETUP_PIC_REG_LEAF(o2,g1) \ - sethi %hi(rtld_errno), %g1; \ - or %g1, %lo(rtld_errno), %g1; \ - ldx [%o2 + %g1], %g1; \ - st %o0, [%g1]; \ - jmp %o7 + 8; \ - mov -1, %o0; -# endif # elif defined _LIBC_REENTRANT # ifndef NOT_IN_libc @@ -130,8 +119,7 @@ ENTRY(name); \ jmp %o7 + 8; \ mov -1, %o0; # else -# ifdef HAVE_BINUTILS_GOTDATA -# define SYSCALL_ERROR_HANDLER \ +# define SYSCALL_ERROR_HANDLER \ 0: SETUP_PIC_REG_LEAF(o2,g1) \ sethi %gdop_hix22(errno), %g1;\ xor %g1, %gdop_lox10(errno), %g1;\ @@ -139,16 +127,6 @@ ENTRY(name); \ st %o0, [%g1]; \ jmp %o7 + 8; \ mov -1, %o0; -# else -# define SYSCALL_ERROR_HANDLER \ -0: SETUP_PIC_REG_LEAF(o2,g1) \ - sethi %hi(errno), %g1; \ - or %g1, %lo(errno), %g1; \ - ldx [%o2 + %g1], %g1; \ - st %o0, [%g1]; \ - jmp %o7 + 8; \ - mov -1, %o0; -# endif # endif /* _LIBC_REENTRANT */ #endif /* PIC */ diff --git a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c index a13948b..e41fddb 100644 --- a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c +++ b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c @@ -30,7 +30,7 @@ gettimeofday_ifunc (void) PREPARE_VERSION (linux26, "LINUX_2.6", 61765110); /* If the vDSO is not available we fall back on the old vsyscall. */ - return (_dl_vdso_vsym ("gettimeofday", &linux26) + return (_dl_vdso_vsym ("__vdso_gettimeofday", &linux26) ?: (void *) VSYSCALL_ADDR_vgettimeofday); } __asm (".type __gettimeofday, %gnu_indirect_function"); diff --git a/sysdeps/unix/sysv/linux/x86_64/init-first.c b/sysdeps/unix/sysv/linux/x86_64/init-first.c index 0a9948b..e8b52ea 100644 --- a/sysdeps/unix/sysv/linux/x86_64/init-first.c +++ b/sysdeps/unix/sysv/linux/x86_64/init-first.c @@ -36,13 +36,13 @@ _libc_vdso_platform_setup (void) { PREPARE_VERSION (linux26, "LINUX_2.6", 61765110); - void *p = _dl_vdso_vsym ("clock_gettime", &linux26); + void *p = _dl_vdso_vsym ("__vdso_clock_gettime", &linux26); if (p == NULL) p = __syscall_clock_gettime; PTR_MANGLE (p); __GI___vdso_clock_gettime = p; - p = _dl_vdso_vsym ("getcpu", &linux26); + p = _dl_vdso_vsym ("__vdso_getcpu", &linux26); /* If the vDSO is not available we fall back on the old vsyscall. */ #define VSYSCALL_ADDR_vgetcpu 0xffffffffff600800 if (p == NULL) diff --git a/sysdeps/unix/sysv/linux/x86_64/time.c b/sysdeps/unix/sysv/linux/x86_64/time.c index 67afff3..0e05ddd 100644 --- a/sysdeps/unix/sysv/linux/x86_64/time.c +++ b/sysdeps/unix/sysv/linux/x86_64/time.c @@ -28,7 +28,7 @@ time_ifunc (void) PREPARE_VERSION (linux26, "LINUX_2.6", 61765110); /* If the vDSO is not available we fall back on the old vsyscall. */ - return _dl_vdso_vsym ("time", &linux26) ?: (void *) VSYSCALL_ADDR_vtime; + return _dl_vdso_vsym ("__vdso_time", &linux26) ?: (void *) VSYSCALL_ADDR_vtime; } __asm (".type time, %gnu_indirect_function"); |