summaryrefslogtreecommitdiff
path: root/libc/sysdeps
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2007-02-05 17:59:45 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2007-02-05 17:59:45 +0000
commitfbeabbdc554f256444af02146bec6b76541c75a8 (patch)
tree1b92c9867abb92a68a34073eda060e66750f032c /libc/sysdeps
parent1e1eaa2d6be863fbfa1526a0b42e7fb0f1b042e0 (diff)
downloadeglibc2-fbeabbdc554f256444af02146bec6b76541c75a8.tar.gz
Merge changes between r1192 and r1382 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@1383 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/sysdeps')
-rw-r--r--libc/sysdeps/generic/ldsodefs.h8
-rw-r--r--libc/sysdeps/i386/bits/byteswap.h6
-rw-r--r--libc/sysdeps/i386/dl-trampoline.S18
-rw-r--r--libc/sysdeps/ieee754/ldbl-128ibm/s_ceill.c2
-rw-r--r--libc/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c2
-rw-r--r--libc/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c2
-rw-r--r--libc/sysdeps/ieee754/ldbl-128ibm/s_floorl.c2
-rw-r--r--libc/sysdeps/ieee754/ldbl-128ibm/s_roundl.c2
-rw-r--r--libc/sysdeps/ieee754/ldbl-128ibm/s_truncl.c2
-rw-r--r--libc/sysdeps/posix/system.c18
-rw-r--r--libc/sysdeps/unix/sysv/linux/fatal-prepare.h9
-rw-r--r--libc/sysdeps/unix/sysv/linux/getdents.c5
-rw-r--r--libc/sysdeps/unix/sysv/linux/i386/sysdep.h18
-rw-r--r--libc/sysdeps/unix/sysv/linux/sys/personality.h11
-rw-r--r--libc/sysdeps/unix/sysv/linux/x86_64/sysdep.h31
-rw-r--r--libc/sysdeps/x86_64/bits/byteswap.h6
16 files changed, 77 insertions, 65 deletions
diff --git a/libc/sysdeps/generic/ldsodefs.h b/libc/sysdeps/generic/ldsodefs.h
index dda91bb80..a9d20b215 100644
--- a/libc/sysdeps/generic/ldsodefs.h
+++ b/libc/sysdeps/generic/ldsodefs.h
@@ -1,5 +1,5 @@
/* Run-time dynamic linker data structures for loaded ELF shared objects.
- Copyright (C) 1995-2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1995-2006, 2007 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
@@ -838,7 +838,9 @@ enum
DL_LOOKUP_ADD_DEPENDENCY = 1,
/* Return most recent version instead of default version for
unversioned lookup. */
- DL_LOOKUP_RETURN_NEWEST = 2
+ DL_LOOKUP_RETURN_NEWEST = 2,
+ /* Set if the scopr lock in the UNDEF_MAP is taken. */
+ DL_LOOKUP_SCOPE_LOCK = 4
};
/* Lookup versioned symbol. */
@@ -847,7 +849,7 @@ extern lookup_t _dl_lookup_symbol_x (const char *undef,
const ElfW(Sym) **sym,
struct r_scope_elem *symbol_scope[],
const struct r_found_version *version,
- int type_class, int explicit,
+ int type_class, int flags,
struct link_map *skip_map)
internal_function attribute_hidden;
diff --git a/libc/sysdeps/i386/bits/byteswap.h b/libc/sysdeps/i386/bits/byteswap.h
index bed27559c..3baad85e8 100644
--- a/libc/sysdeps/i386/bits/byteswap.h
+++ b/libc/sysdeps/i386/bits/byteswap.h
@@ -1,5 +1,6 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997,1998,2000,2002,2003,2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007
+ 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
@@ -66,7 +67,8 @@ __bswap_16 (unsigned short int __bsx)
`bswap' opcode. On i386 we have to use three instructions. */
# if !defined __i486__ && !defined __pentium__ && !defined __pentiumpro__ \
&& !defined __pentium4__ && !defined __k8__ && !defined __athlon__ \
- && !defined __k6__
+ && !defined __k6__ && !defined __nocona__ && !defined __core2__ \
+ && !defined __geode__
# define __bswap_32(x) \
(__extension__ \
({ register unsigned int __v, __x = (x); \
diff --git a/libc/sysdeps/i386/dl-trampoline.S b/libc/sysdeps/i386/dl-trampoline.S
index fd87eb711..f991797ee 100644
--- a/libc/sysdeps/i386/dl-trampoline.S
+++ b/libc/sysdeps/i386/dl-trampoline.S
@@ -1,5 +1,5 @@
/* PLT trampolines. i386 version.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2007 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
@@ -101,29 +101,29 @@ _dl_runtime_profile:
*/
cfi_adjust_cfa_offset (12)
1: movl %ebx, (%esp)
- cfi_rel_offset (3, 0)
+ cfi_rel_offset (ebx, 0)
movl %edx, %ebx # This is the frame buffer size
pushl %edi
cfi_adjust_cfa_offset (4)
- cfi_rel_offset (7, 0)
+ cfi_rel_offset (edi, 0)
pushl %esi
cfi_adjust_cfa_offset (4)
- cfi_rel_offset (6, 0)
+ cfi_rel_offset (esi, 0)
leal 44(%esp), %esi
movl %ebx, %ecx
movl %esp, %edi
subl %ebx, %edi
andl $0xfffffff0, %edi # Align stack
movl %esp, %ebx
- cfi_def_cfa_register (3)
+ cfi_def_cfa_register (ebx)
movl %edi, %esp
shrl $2, %ecx
rep
movsl
movl (%edi), %esi
- cfi_restore (6)
+ cfi_restore (esi)
movl 4(%edi), %edi
- cfi_restore (7)
+ cfi_restore (edi)
/*
%ebx+40 return address
%ebx+36 PLT1
@@ -144,9 +144,9 @@ _dl_runtime_profile:
movl 20(%ebx), %eax
call *(%ebx)
movl %ebx, %esp
- cfi_def_cfa_register (4)
+ cfi_def_cfa_register (esp)
movl 8(%esp), %ebx
- cfi_restore (3)
+ cfi_restore (ebx)
/*
+40 return address
+36 PLT1
diff --git a/libc/sysdeps/ieee754/ldbl-128ibm/s_ceill.c b/libc/sysdeps/ieee754/ldbl-128ibm/s_ceill.c
index cf531969e..6252e9140 100644
--- a/libc/sysdeps/ieee754/ldbl-128ibm/s_ceill.c
+++ b/libc/sysdeps/ieee754/ldbl-128ibm/s_ceill.c
@@ -1,6 +1,6 @@
/* Ceil (round to +inf) long double floating-point values.
IBM extended format long double version.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 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/libc/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c b/libc/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c
index d4c02d2e7..1a198c16e 100644
--- a/libc/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c
+++ b/libc/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c
@@ -34,7 +34,7 @@ static char rcsid[] = "$NetBSD: $";
long double x,y;
#endif
{
- if( signbit(x) != signbit(y) )
+ if (signbit (x) != signbit (y))
x = -x;
return x;
}
diff --git a/libc/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c b/libc/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c
index 63b232855..89eb20510 100644
--- a/libc/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c
+++ b/libc/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c
@@ -38,6 +38,6 @@ static char rcsid[] = "$NetBSD: $";
lx = lx ^ ( hx & 0x8000000000000000LL );
hx = hx & 0x7fffffffffffffffLL;
SET_LDOUBLE_WORDS64(x,hx,lx);
- return x;
+ return x;
}
long_double_symbol (libm, __fabsl, fabsl);
diff --git a/libc/sysdeps/ieee754/ldbl-128ibm/s_floorl.c b/libc/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
index 7e7510313..eff757240 100644
--- a/libc/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
+++ b/libc/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
@@ -1,6 +1,6 @@
/* Round to int long double floating-point values.
IBM extended format long double version.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 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/libc/sysdeps/ieee754/ldbl-128ibm/s_roundl.c b/libc/sysdeps/ieee754/ldbl-128ibm/s_roundl.c
index 88813e1d7..d633bfa4c 100644
--- a/libc/sysdeps/ieee754/ldbl-128ibm/s_roundl.c
+++ b/libc/sysdeps/ieee754/ldbl-128ibm/s_roundl.c
@@ -1,6 +1,6 @@
/* Round to int long double floating-point values.
IBM extended format long double version.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 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/libc/sysdeps/ieee754/ldbl-128ibm/s_truncl.c b/libc/sysdeps/ieee754/ldbl-128ibm/s_truncl.c
index 73efb8d63..ceace0d43 100644
--- a/libc/sysdeps/ieee754/ldbl-128ibm/s_truncl.c
+++ b/libc/sysdeps/ieee754/ldbl-128ibm/s_truncl.c
@@ -1,6 +1,6 @@
/* Truncate (toward zero) long double floating-point values.
IBM extended format long double version.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 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/libc/sysdeps/posix/system.c b/libc/sysdeps/posix/system.c
index f63dde4da..e78195ef8 100644
--- a/libc/sysdeps/posix/system.c
+++ b/libc/sysdeps/posix/system.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2000, 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2000,2002,2003,2005,2007 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
@@ -143,27 +143,11 @@ do_system (const char *line)
else
/* Parent side. */
{
-#ifdef NO_WAITPID
- pid_t child;
- do
- {
- child = __wait (&status);
- if (child <= -1 && errno != EINTR)
- {
- status = -1;
- break;
- }
- /* Note that pid cannot be <= -1 and therefore the loop continues
- when __wait returned with EINTR. */
- }
- while (child != pid);
-#else
/* Note the system() is a cancellation point. But since we call
waitpid() which itself is a cancellation point we do not
have to do anything here. */
if (TEMP_FAILURE_RETRY (__waitpid (pid, &status, 0)) != pid)
status = -1;
-#endif
}
#ifdef CLEANUP_HANDLER
diff --git a/libc/sysdeps/unix/sysv/linux/fatal-prepare.h b/libc/sysdeps/unix/sysv/linux/fatal-prepare.h
index d48ae625e..81f38b09e 100644
--- a/libc/sysdeps/unix/sysv/linux/fatal-prepare.h
+++ b/libc/sysdeps/unix/sysv/linux/fatal-prepare.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2007 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
@@ -24,10 +24,9 @@
# include <pthread-functions.h>
# define FATAL_PREPARE \
{ \
- int (*fp) (int, int *); \
- fp = __libc_pthread_functions.ptr_pthread_setcancelstate; \
- if (fp != NULL) \
- fp (PTHREAD_CANCEL_DISABLE, NULL); \
+ if (__libc_pthread_functions_init) \
+ PTHFCT_CALL (ptr_pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, \
+ NULL)); \
}
#else
# pragma weak pthread_setcancelstate
diff --git a/libc/sysdeps/unix/sysv/linux/getdents.c b/libc/sysdeps/unix/sysv/linux/getdents.c
index 836cbf392..b33d1789a 100644
--- a/libc/sysdeps/unix/sysv/linux/getdents.c
+++ b/libc/sysdeps/unix/sysv/linux/getdents.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993, 1995-2003, 2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995-2003, 2004, 2006, 2007
+ 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
@@ -50,8 +51,6 @@ extern int __have_no_getdents64 attribute_hidden;
# define __have_no_getdents64 0
#endif
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-
/* For Linux we need a special version of this file since the
definition of `struct dirent' is not the same for the kernel and
the libc. There is one additional field which might be introduced
diff --git a/libc/sysdeps/unix/sysv/linux/i386/sysdep.h b/libc/sysdeps/unix/sysv/linux/i386/sysdep.h
index 5286676fc..89d5b1204 100644
--- a/libc/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/libc/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,1993,1995-2000,2002-2005,2006
+/* Copyright (C) 1992,1993,1995-2000,2002-2006,2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.org>, August 1995.
@@ -566,15 +566,23 @@ asm (".L__X'%ebx = 1\n\t"
is too complicated here since we have no PC-relative addressing mode. */
#else
# ifdef __ASSEMBLER__
-# define PTR_MANGLE(reg) xorl %gs:POINTER_GUARD, reg
-# define PTR_DEMANGLE(reg) PTR_MANGLE (reg)
+# define PTR_MANGLE(reg) xorl %gs:POINTER_GUARD, reg; \
+ roll $9, reg
+# define PTR_DEMANGLE(reg) rorl $9, reg; \
+ xorl %gs:POINTER_GUARD, reg
# else
-# define PTR_MANGLE(var) asm ("xorl %%gs:%c2, %0" \
+# define PTR_MANGLE(var) asm ("xorl %%gs:%c2, %0\n" \
+ "roll $9, %0" \
+ : "=r" (var) \
+ : "0" (var), \
+ "i" (offsetof (tcbhead_t, \
+ pointer_guard)))
+# define PTR_DEMANGLE(var) asm ("rorl $9, %0\n" \
+ "xorl %%gs:%c2, %0" \
: "=r" (var) \
: "0" (var), \
"i" (offsetof (tcbhead_t, \
pointer_guard)))
-# define PTR_DEMANGLE(var) PTR_MANGLE (var)
# endif
#endif
diff --git a/libc/sysdeps/unix/sysv/linux/sys/personality.h b/libc/sysdeps/unix/sysv/linux/sys/personality.h
index 5d14a9bc8..ff7c61aa5 100644
--- a/libc/sysdeps/unix/sysv/linux/sys/personality.h
+++ b/libc/sysdeps/unix/sysv/linux/sys/personality.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2007 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
@@ -16,7 +16,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* Taken verbatim from Linux 2.4 (include/linux/personality.h). */
+/* Taken verbatim from Linux 2.6 (include/linux/personality.h). */
#ifndef _SYS_PERSONALITY_H
#define _SYS_PERSONALITY_H 1
@@ -27,11 +27,13 @@
These occupy the top three bytes. */
enum
{
+ ADDR_NO_RANDOMIZE = 0x0040000,
MMAP_PAGE_ZERO = 0x0100000,
ADDR_LIMIT_32BIT = 0x0800000,
SHORT_INODE = 0x1000000,
WHOLE_SECONDS = 0x2000000,
STICKY_TIMEOUTS = 0x4000000,
+ ADDR_LIMIT_3GB = 0x8000000
};
/* Personality types.
@@ -52,14 +54,15 @@ enum
PER_SUNOS = 0x0006 | STICKY_TIMEOUTS,
PER_XENIX = 0x0007 | STICKY_TIMEOUTS | SHORT_INODE,
PER_LINUX32 = 0x0008,
+ PER_LINUX32_3GB = 0x0008 | ADDR_LIMIT_3GB,
PER_IRIX32 = 0x0009 | STICKY_TIMEOUTS, /* IRIX5 32-bit */
PER_IRIXN32 = 0x000a | STICKY_TIMEOUTS, /* IRIX6 new 32-bit */
PER_IRIX64 = 0x000b | STICKY_TIMEOUTS, /* IRIX6 64-bit */
PER_RISCOS = 0x000c,
PER_SOLARIS = 0x000d | STICKY_TIMEOUTS,
PER_UW7 = 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
- PER_HPUX = 0x000f,
- PER_OSF4 = 0x0010,
+ PER_OSF4 = 0x000f,
+ PER_HPUX = 0x0010,
PER_MASK = 0x00ff,
};
diff --git a/libc/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/libc/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index 5dfffca45..3a0a632aa 100644
--- a/libc/sysdeps/unix/sysv/linux/x86_64/sysdep.h
+++ b/libc/sysdeps/unix/sysv/linux/x86_64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2005, 2007 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
@@ -317,24 +317,37 @@
/* We cannot use the thread descriptor because in ld.so we use setjmp
earlier than the descriptor is initialized. */
# ifdef __ASSEMBLER__
-# define PTR_MANGLE(reg) xorq __pointer_chk_guard_local(%rip), reg
-# define PTR_DEMANGLE(reg) PTR_MANGLE (reg)
+# define PTR_MANGLE(reg) xorq __pointer_chk_guard_local(%rip), reg; \
+ rolq $17, reg
+# define PTR_DEMANGLE(reg) rorq $17, reg; \
+ xorq __pointer_chk_guard_local(%rip), reg
# else
-# define PTR_MANGLE(reg) asm ("xorq __pointer_chk_guard_local(%%rip), %0"\
+# define PTR_MANGLE(reg) asm ("xorq __pointer_chk_guard_local(%%rip), %0\n" \
+ "rolq $17, %0" \
+ : "=r" (reg) : "0" (reg))
+# define PTR_DEMANGLE(reg) asm ("rorq $17, %0\n" \
+ "xorq __pointer_chk_guard_local(%%rip), %0" \
: "=r" (reg) : "0" (reg))
-# define PTR_DEMANGLE(reg) PTR_MANGLE (reg)
# endif
#else
# ifdef __ASSEMBLER__
-# define PTR_MANGLE(reg) xorq %fs:POINTER_GUARD, reg
-# define PTR_DEMANGLE(reg) PTR_MANGLE (reg)
+# define PTR_MANGLE(reg) xorq %fs:POINTER_GUARD, reg; \
+ rolq $17, reg
+# define PTR_DEMANGLE(reg) rorq $17, reg; \
+ xorq %fs:POINTER_GUARD, reg
# else
-# define PTR_MANGLE(var) asm ("xorq %%fs:%c2, %0" \
+# define PTR_MANGLE(var) asm ("xorq %%fs:%c2, %0\n" \
+ "rolq $17, %0" \
+ : "=r" (var) \
+ : "0" (var), \
+ "i" (offsetof (tcbhead_t, \
+ pointer_guard)))
+# define PTR_DEMANGLE(var) asm ("rorq $17, %0\n" \
+ "xorq %%fs:%c2, %0" \
: "=r" (var) \
: "0" (var), \
"i" (offsetof (tcbhead_t, \
pointer_guard)))
-# define PTR_DEMANGLE(var) PTR_MANGLE (var)
# endif
#endif
diff --git a/libc/sysdeps/x86_64/bits/byteswap.h b/libc/sysdeps/x86_64/bits/byteswap.h
index e1c861c75..7514a9f4d 100644
--- a/libc/sysdeps/x86_64/bits/byteswap.h
+++ b/libc/sysdeps/x86_64/bits/byteswap.h
@@ -1,5 +1,6 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007
+ 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
@@ -59,7 +60,8 @@
# if __WORDSIZE == 64 || (defined __i486__ || defined __pentium__ \
|| defined __pentiumpro__ || defined __pentium4__ \
|| defined __k8__ || defined __athlon__ \
- || defined __k6__)
+ || defined __k6__ || defined __nocona__ \
+ || defined __core2__ || defined __geode__)
/* To swap the bytes in a word the i486 processors and up provide the
`bswap' opcode. On i386 we have to use three instructions. */
# define __bswap_32(x) \