diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-05-03 09:28:32 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-05-03 09:28:32 +0000 |
commit | eec65e81e75bc0af8212e59a281b52d920607fc8 (patch) | |
tree | 6b9c5f1795a1062c593a4f1cfb3cc92b8eb90970 /sysdeps | |
parent | a0971eefb70ea4bf2c240f8b33926dde1dfbeb09 (diff) | |
download | glibc-eec65e81e75bc0af8212e59a281b52d920607fc8.tar glibc-eec65e81e75bc0af8212e59a281b52d920607fc8.tar.gz glibc-eec65e81e75bc0af8212e59a281b52d920607fc8.tar.bz2 glibc-eec65e81e75bc0af8212e59a281b52d920607fc8.zip |
Updated to fedora-glibc-20050503T0852
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/alpha/dl-sysdep.h | 21 | ||||
-rw-r--r-- | sysdeps/generic/dl-sysdep.h | 8 | ||||
-rw-r--r-- | sysdeps/i386/i686/memcmp.S | 4 | ||||
-rw-r--r-- | sysdeps/i386/sysdep.h | 10 | ||||
-rw-r--r-- | sysdeps/ia64/dl-sysdep.h | 21 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/memset.S | 7 | ||||
-rw-r--r-- | sysdeps/sparc/dl-sysdep.h | 21 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/dl-sysdep.h | 27 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/socket.S | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sysdep.h | 30 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/kernel-features.h | 22 |
11 files changed, 86 insertions, 89 deletions
diff --git a/sysdeps/alpha/dl-sysdep.h b/sysdeps/alpha/dl-sysdep.h index 0b4c8050de..cd678f4e43 100644 --- a/sysdeps/alpha/dl-sysdep.h +++ b/sysdeps/alpha/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. Alpha version. - Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005 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,25 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _DL_SYSDEP_H -#define _DL_SYSDEP_H 1 - -/* This macro must be defined to either 0 or 1. - - If 1, then an errno global variable hidden in ld.so will work right with - all the errno-using libc code compiled for ld.so, and there is never a - need to share the errno location with libc. This is appropriate only if - all the libc functions that ld.so uses are called without PLT and always - get the versions linked into ld.so rather than the libc ones. */ - -#ifdef IS_IN_rtld -# define RTLD_PRIVATE_ERRNO 1 -#else -# define RTLD_PRIVATE_ERRNO 0 -#endif +#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 - -#endif /* dl-sysdep.h */ diff --git a/sysdeps/generic/dl-sysdep.h b/sysdeps/generic/dl-sysdep.h index 565287027c..c99fd3ea36 100644 --- a/sysdeps/generic/dl-sysdep.h +++ b/sysdeps/generic/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. Generic version. - Copyright (C) 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2005 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,8 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _DL_SYSDEP_H -#define _DL_SYSDEP_H 1 +/* No multiple inclusion protection need here because it's just macros. + We don't want to use _DL_SYSDEP_H in case we are #include_next'd. */ /* This macro must be defined to either 0 or 1. @@ -33,5 +33,3 @@ #else # define RTLD_PRIVATE_ERRNO 0 #endif - -#endif /* dl-sysdep.h */ diff --git a/sysdeps/i386/i686/memcmp.S b/sysdeps/i386/i686/memcmp.S index ef57acdee8..29aa546df5 100644 --- a/sysdeps/i386/i686/memcmp.S +++ b/sysdeps/i386/i686/memcmp.S @@ -1,5 +1,5 @@ /* Compare two memory blocks for differences in the first COUNT bytes. - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004, 2005 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 @@ -350,6 +350,7 @@ L(set): sbbl $-1, %eax popl %esi RETURN +END (BP_SYM (memcmp)) .section .rodata ALIGN (2) @@ -387,7 +388,6 @@ L(table_32bytes) : .long L(30bytes) - . + 0x78 .long L(31bytes) - . + 0x7c -END (BP_SYM (memcmp)) #undef bcmp weak_alias (BP_SYM (memcmp), BP_SYM (bcmp)) diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h index e955b43f95..56ba304328 100644 --- a/sysdeps/i386/sysdep.h +++ b/sysdeps/i386/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for i386. - Copyright (C) 1991,92,93,95,96,98,2002,2003 Free Software Foundation, Inc. + Copyright (C) 1991-93,95,96,98,2002,2003,2005 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 @@ -57,10 +57,12 @@ .align ALIGNARG(4); \ STABS_FUN(name) \ C_LABEL(name) \ + cfi_startproc; \ CALL_MCOUNT #undef END #define END(name) \ + cfi_endproc; \ ASM_SIZE_DIRECTIVE(name) \ STABS_FUN_END(name) @@ -92,7 +94,9 @@ /* The mcount code relies on a normal frame pointer being on the stack to locate our caller, so push one just for its benefit. */ #define CALL_MCOUNT \ - pushl %ebp; movl %esp, %ebp; call JUMPTARGET(mcount); popl %ebp; + pushl %ebp; cfi_adjust_cfa_offset (4); movl %esp, %ebp; \ + cfi_def_cfa_register (ebp); call JUMPTARGET(mcount); \ + popl %ebp; cfi_def_cfa (esp, 4); #else #define CALL_MCOUNT /* Do nothing. */ #endif @@ -122,8 +126,10 @@ lose: SYSCALL_PIC_SETUP \ #define JUMPTARGET(name) name##@PLT #define SYSCALL_PIC_SETUP \ pushl %ebx; \ + cfi_adjust_cfa_offset (4); \ call 0f; \ 0: popl %ebx; \ + cfi_adjust_cfa_offset (-4); \ addl $_GLOBAL_OFFSET_TABLE+[.-0b], %ebx; #else #define JUMPTARGET(name) name diff --git a/sysdeps/ia64/dl-sysdep.h b/sysdeps/ia64/dl-sysdep.h index 352bb3bed5..e4040efc4c 100644 --- a/sysdeps/ia64/dl-sysdep.h +++ b/sysdeps/ia64/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. IA-64 version. - Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005 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,25 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _DL_SYSDEP_H -#define _DL_SYSDEP_H 1 - -/* This macro must be defined to either 0 or 1. - - If 1, then an errno global variable hidden in ld.so will work right with - all the errno-using libc code compiled for ld.so, and there is never a - need to share the errno location with libc. This is appropriate only if - all the libc functions that ld.so uses are called without PLT and always - get the versions linked into ld.so rather than the libc ones. */ - -#ifdef IS_IN_rtld -# define RTLD_PRIVATE_ERRNO 1 -#else -# define RTLD_PRIVATE_ERRNO 0 -#endif +#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 - -#endif /* dl-sysdep.h */ diff --git a/sysdeps/powerpc/powerpc64/memset.S b/sysdeps/powerpc/powerpc64/memset.S index 1abc59bb17..09c79fccd7 100644 --- a/sysdeps/powerpc/powerpc64/memset.S +++ b/sysdeps/powerpc/powerpc64/memset.S @@ -62,8 +62,7 @@ EALIGN (BP_SYM (memset), 5, 0) #define rNEG64 r8 /* Constant -64 for clearing with dcbz. */ #define rCLS r8 /* Cache line size obtained from static. */ #define rCLM r9 /* Cache line size mask to check for cache alignment. */ - -___memset: +L(_memset): #if __BOUNDED_POINTERS__ cmpldi cr1, rRTN, 0 CHECK_BOUNDS_BOTH_WIDE (rMEMP0, rTMP, rTMP2, rLEN) @@ -282,11 +281,11 @@ ENTRY (BP_SYM (__bzero)) mr r4,r3 /* Tell memset that we don't want a return value. */ li r3,0 - b ___memset + b L(_memset) #else mr r5,r4 li r4,0 - b ___memset + b L(_memset) #endif END_GEN_TB (BP_SYM (__bzero),TB_TOCLESS) diff --git a/sysdeps/sparc/dl-sysdep.h b/sysdeps/sparc/dl-sysdep.h index eb6a788a89..2dee6b1f50 100644 --- a/sysdeps/sparc/dl-sysdep.h +++ b/sysdeps/sparc/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. SPARC version. - Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005 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,25 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _DL_SYSDEP_H -#define _DL_SYSDEP_H 1 - -/* This macro must be defined to either 0 or 1. - - If 1, then an errno global variable hidden in ld.so will work right with - all the errno-using libc code compiled for ld.so, and there is never a - need to share the errno location with libc. This is appropriate only if - all the libc functions that ld.so uses are called without PLT and always - get the versions linked into ld.so rather than the libc ones. */ - -#ifdef IS_IN_rtld -# define RTLD_PRIVATE_ERRNO 1 -#else -# define RTLD_PRIVATE_ERRNO 0 -#endif +#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 - -#endif /* dl-sysdep.h */ diff --git a/sysdeps/unix/sysv/linux/dl-sysdep.h b/sysdeps/unix/sysv/linux/dl-sysdep.h new file mode 100644 index 0000000000..becfc8df3f --- /dev/null +++ b/sysdeps/unix/sysv/linux/dl-sysdep.h @@ -0,0 +1,27 @@ +/* System-specific settings for dynamic linker code. Linux version. + Copyright (C) 2005 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include_next <dl-sysdep.h> + +/* On many architectures the kernel provides a virtual DSO and gives + AT_SYSINFO_EHDR to point us to it. As this is introduced for new + machines, we should look at it for unwind information even if + we aren't making direct use of it. So enable this across the board. */ + +#define NEED_DL_SYSINFO_DSO 1 diff --git a/sysdeps/unix/sysv/linux/i386/socket.S b/sysdeps/unix/sysv/linux/i386/socket.S index e403899cc6..7c8ac29b86 100644 --- a/sysdeps/unix/sysv/linux/i386/socket.S +++ b/sysdeps/unix/sysv/linux/i386/socket.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1995-1998,2002,2003,2005 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 @@ -41,7 +41,6 @@ #endif .globl __socket - cfi_startproc ENTRY (__socket) #if defined NEED_CANCELLATION && defined CENABLE SINGLE_THREAD_P @@ -118,7 +117,6 @@ L(pseudo_end): /* Successful; return the syscall's value. */ ret #endif - cfi_endproc PSEUDO_END (__socket) #ifndef NO_WEAK_ALIAS diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 6bea9d2044..d64d0a3a5c 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -168,16 +168,22 @@ __i686.get_pc_thunk.reg: \ # else # define SYSCALL_ERROR_HANDLER \ 0:pushl %ebx; \ + cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (ebx, 0); \ SETUP_PIC_REG (bx); \ addl $_GLOBAL_OFFSET_TABLE_, %ebx; \ xorl %edx, %edx; \ subl %eax, %edx; \ pushl %edx; \ + cfi_adjust_cfa_offset (4); \ PUSH_ERRNO_LOCATION_RETURN; \ call BP_SYM (__errno_location)@PLT; \ POP_ERRNO_LOCATION_RETURN; \ popl %ecx; \ + cfi_adjust_cfa_offset (-4); \ popl %ebx; \ + cfi_adjust_cfa_offset (-4); \ + cfi_restore (ebx); \ movl %ecx, (%eax); \ orl $-1, %eax; \ jmp L(pseudo_end); @@ -273,9 +279,11 @@ __i686.get_pc_thunk.reg: \ #define PUSHARGS_1 movl %ebx, %edx; L(SAVEBX1): PUSHARGS_0 #define DOARGS_1 _DOARGS_1 (4) #define POPARGS_1 POPARGS_0; movl %edx, %ebx; L(RESTBX1): -#define _PUSHARGS_1 pushl %ebx; L(PUSHBX1): _PUSHARGS_0 +#define _PUSHARGS_1 pushl %ebx; cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (ebx, 0); L(PUSHBX1): _PUSHARGS_0 #define _DOARGS_1(n) movl n(%esp), %ebx; _DOARGS_0(n-4) -#define _POPARGS_1 _POPARGS_0; popl %ebx; L(POPBX1): +#define _POPARGS_1 _POPARGS_0; popl %ebx; cfi_adjust_cfa_offset (-4); \ + cfi_restore (ebx); L(POPBX1): #define PUSHARGS_2 PUSHARGS_1 #define DOARGS_2 _DOARGS_2 (8) @@ -294,23 +302,29 @@ __i686.get_pc_thunk.reg: \ #define PUSHARGS_4 _PUSHARGS_4 #define DOARGS_4 _DOARGS_4 (24) #define POPARGS_4 _POPARGS_4 -#define _PUSHARGS_4 pushl %esi; L(PUSHSI1): _PUSHARGS_3 +#define _PUSHARGS_4 pushl %esi; cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (esi, 0); L(PUSHSI1): _PUSHARGS_3 #define _DOARGS_4(n) movl n(%esp), %esi; _DOARGS_3 (n-4) -#define _POPARGS_4 _POPARGS_3; popl %esi; L(POPSI1): +#define _POPARGS_4 _POPARGS_3; popl %esi; cfi_adjust_cfa_offset (-4); \ + cfi_restore (esi); L(POPSI1): #define PUSHARGS_5 _PUSHARGS_5 #define DOARGS_5 _DOARGS_5 (32) #define POPARGS_5 _POPARGS_5 -#define _PUSHARGS_5 pushl %edi; L(PUSHDI1): _PUSHARGS_4 +#define _PUSHARGS_5 pushl %edi; cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (edi, 0); L(PUSHDI1): _PUSHARGS_4 #define _DOARGS_5(n) movl n(%esp), %edi; _DOARGS_4 (n-4) -#define _POPARGS_5 _POPARGS_4; popl %edi; L(POPDI1): +#define _POPARGS_5 _POPARGS_4; popl %edi; cfi_adjust_cfa_offset (-4); \ + cfi_restore (edi); L(POPDI1): #define PUSHARGS_6 _PUSHARGS_6 #define DOARGS_6 _DOARGS_6 (36) #define POPARGS_6 _POPARGS_6 -#define _PUSHARGS_6 pushl %ebp; L(PUSHBP1): _PUSHARGS_5 +#define _PUSHARGS_6 pushl %ebp; cfi_adjust_cfa_offset (4); \ + cfi_rel_offset (ebp, 0); L(PUSHBP1): _PUSHARGS_5 #define _DOARGS_6(n) movl n(%esp), %ebp; _DOARGS_5 (n-4) -#define _POPARGS_6 _POPARGS_5; popl %ebp; L(POPBP1): +#define _POPARGS_6 _POPARGS_5; popl %ebp; cfi_adjust_cfa_offset (-4); \ + cfi_restore (ebp); L(POPBP1): #else /* !__ASSEMBLER__ */ diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 83ebe0cf74..26cddd5a73 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -354,22 +354,24 @@ /* The tgkill syscall was instroduced for i386 in 2.5.75. For Alpha it was introduced in 2.6.0-test1 which unfortunately cannot be - distinguished from 2.6.0. On x86-64 it was introduced in - 2.6.0-test3. */ + distinguished from 2.6.0. On x86-64, ppc, and ppc64 it was + introduced in 2.6.0-test3. */ #if (__LINUX_KERNEL_VERSION >= 132427 && defined __i386__) \ || (__LINUX_KERNEL_VERSION >= 132609 && defined __alpha__) \ || (__LINUX_KERNEL_VERSION >= 132609 && defined __x86_64__) \ + || (__LINUX_KERNEL_VERSION >= 132609 && defined __powerpc__) \ || (__LINUX_KERNEL_VERSION >= 132609 && defined __sh__) # define __ASSUME_TGKILL 1 #endif /* The utimes syscall has been available for some architectures - forever. For x86 it was introduced after 2.5.75, for x86-64 in - 2.6.0-test3. */ + forever. For x86 it was introduced after 2.5.75, for x86-64, + ppc, and ppc64 it was introduced in 2.6.0-test3. */ #if defined __alpha__ || defined __ia64__ || defined __hppa__ \ || defined __sparc__ \ || (__LINUX_KERNEL_VERSION > 132427 && defined __i386__) \ || (__LINUX_KERNEL_VERSION > 132609 && defined __x86_64__) \ + || (__LINUX_KERNEL_VERSION >= 132609 && defined __powerpc__) \ || (__LINUX_KERNEL_VERSION >= 132609 && defined __sh__) # define __ASSUME_UTIMES 1 #endif @@ -383,8 +385,11 @@ #endif /* The fixed version of the posix_fadvise64 syscall appeared in - 2.6.0-test3. At least for x86. */ -#if __LINUX_KERNEL_VERSION >= 132609 && defined __i386__ + 2.6.0-test3. At least for x86. Powerpc support appeared in + 2.6.2, but for 32-bit userspace only. */ +#if (__LINUX_KERNEL_VERSION >= 132609 && defined __i386__) \ + || (__LINUX_KERNEL_VERSION >= 132610 && defined __powerpc__ \ + && !defined __powerpc64__) # define __ASSUME_FADVISE64_64_SYSCALL 1 #endif @@ -419,8 +424,9 @@ # define __ASSUME_BRK_PAGE_ROUNDED 1 #endif -/* Starting with version 2.6.9, the waitid system call is available. */ -#if __LINUX_KERNEL_VERSION >= 0x020609 +/* Starting with version 2.6.9, the waitid system call is available. + Except for powerpc and powerpc64. */ +#if __LINUX_KERNEL_VERSION >= 0x020609 && !defined __powerpc__ # define __ASSUME_WAITID_SYSCALL 1 #endif |