[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r20264 - in /fsf/trunk/libc: ./ elf/ manual/ ports/ ports/sysdeps/unix/sysv/linux/arm/ ports/sysdeps/unix/sysv/linux/hppa/ p...



Author: eglibc
Date: Tue Aug 21 00:01:52 2012
New Revision: 20264

Log:
Import glibc-mainline for 2012-08-21

Removed:
    fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/getrlimit.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/elf/dl-sysdep.c
    fsf/trunk/libc/manual/syslog.texi
    fsf/trunk/libc/ports/ChangeLog.arm
    fsf/trunk/libc/ports/ChangeLog.hppa
    fsf/trunk/libc/ports/ChangeLog.m68k
    fsf/trunk/libc/ports/ChangeLog.tile
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/tile/kernel-features.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/mmap.S
    fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/mmap64.S
    fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/mmap64.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
    fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S
    fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue Aug 21 00:01:52 2012
@@ -1,3 +1,53 @@
+2012-08-20  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* manual/syslog.texi (syslog; vsyslog, closelog):
+	Fix typo repeated twice: @file{dev/log} -> @file{/dev/log}.
+	Reported by Ricardo Catalinas JimÃÂnez <jimenezrick@xxxxxxxxx>.
+
+	* elf/dl-sysdep.c (_dl_important_hwcaps): Fix conditional on using
+	DSOCAPS to match condition on defining it.
+
+2012-08-20  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/kernel-features.h
+	(__ASSUME_SWAPCONTEXT_SYSCALL): Remove.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
+	[__ASSUME_SWAPCONTEXT_SYSCALL]: Make code unconditional.
+	[!__ASSUME_SWAPCONTEXT_SYSCALL]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
+	[__ASSUME_SWAPCONTEXT_SYSCALL]: Make code unconditional.
+	[!__ASSUME_SWAPCONTEXT_SYSCALL]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
+	[__ASSUME_SWAPCONTEXT_SYSCALL]: Make code unconditional.
+	[!__ASSUME_SWAPCONTEXT_SYSCALL]: Remove conditional code.
+
+	* sysdeps/unix/sysv/linux/kernel-features.h [__s390__ &&
+	__LINUX_KERNEL_VERSION >= 0x020616] (__ASSUME_UTIMES): Define.
+
+	* sysdeps/unix/sysv/linux/kernel-features.h
+	(__ASSUME_MMAP2_SYSCALL): Remove all definitions.
+	* sysdeps/unix/sysv/linux/mmap64.c [__NR_mmap2]: Make code
+	unconditional.
+	[!__ASSUME_MMAP2_SYSCALL]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/mmap.S (__mmap)
+	[__ASSUME_MMAP2_SYSCALL]: Make code unconditional.
+	(__mmap) [!__ASSUME_MMAP2_SYSCALL]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/i386/mmap64.S (__mmap64) [__NR_mmap2]:
+	Make code unconditional.
+	(__mmap64) [!__ASSUME_MMAP2_SYSCALL]: Remove conditional code.
+	(__mmap64) [!__NR_mmap2]: Likewise.
+	* sysdeps/unix/sysv/linux/s390/s390-32/mmap.S (__mmap)
+	[__ASSUME_MMAP2_SYSCALL]: Make code unconditional.
+	(__mmap) [!__ASSUME_MMAP2_SYSCALL]: Remove conditional code.
+	* sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S (__mmap64)
+	[__NR_mmap2]: Make code unconditional.
+	(__mmap64) [!__ASSUME_MMAP2_SYSCALL]: Remove conditional code.
+	(__mmap64) [!__NR_mmap2]: Likewise.
+
+2012-08-20  Andreas Krebbel  <Andreas.Krebbel@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/s390/s390-32/getrlimit.c: Remove.
+
 2012-08-18  Andreas Jaeger  <aj@xxxxxxx>
 
 	* stdio-common/_itoa.c (_itoa): Add missing DUMMY variable.

Modified: fsf/trunk/libc/elf/dl-sysdep.c
==============================================================================
--- fsf/trunk/libc/elf/dl-sysdep.c (original)
+++ fsf/trunk/libc/elf/dl-sysdep.c Tue Aug 21 00:01:52 2012
@@ -420,7 +420,7 @@
   /* Create temporary data structure to generate result table.  */
   temp = (struct r_strlenpair *) alloca (cnt * sizeof (*temp));
   m = 0;
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#if (defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO) && defined SHARED
   if (dsocaps != NULL)
     {
       const ElfW(Word) mask = ((const ElfW(Word) *) dsocaps)[-1];

Modified: fsf/trunk/libc/manual/syslog.texi
==============================================================================
--- fsf/trunk/libc/manual/syslog.texi (original)
+++ fsf/trunk/libc/manual/syslog.texi Tue Aug 21 00:01:52 2012
@@ -379,7 +379,7 @@
 connection options in @var{options} is as if those bits were off.
 @code{syslog} leaves the Syslog connection open.
 
-If the @file{dev/log} socket is not open and connected, @code{syslog}
+If the @file{/dev/log} socket is not open and connected, @code{syslog}
 opens and connects it, the same as @code{openlog} with the
 @code{LOG_NDELAY} option would.
 
@@ -422,7 +422,7 @@
 @deftypefun void closelog (void)
 
 @code{closelog} closes the current Syslog connection, if there is one.
-This includes closing the @file{dev/log} socket, if it is open.
+This includes closing the @file{/dev/log} socket, if it is open.
 @code{closelog} also sets the identification string for Syslog messages
 back to the default, if @code{openlog} was called with a non-NULL argument
 to @var{ident}.  The default identification string is the program name

Modified: fsf/trunk/libc/ports/ChangeLog.arm
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.arm (original)
+++ fsf/trunk/libc/ports/ChangeLog.arm Tue Aug 21 00:01:52 2012
@@ -1,3 +1,8 @@
+2012-08-20  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/arm/kernel-features.h
+	(__ASSUME_MMAP2_SYSCALL): Remove.
+
 2012-08-15  Maxim Kuvyrkov  <maxim@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/arm/nptl/pthread_spin_lock.c: Use generic code.

Modified: fsf/trunk/libc/ports/ChangeLog.hppa
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.hppa (original)
+++ fsf/trunk/libc/ports/ChangeLog.hppa Tue Aug 21 00:01:52 2012
@@ -1,3 +1,8 @@
+2012-08-20  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/hppa/kernel-features.h
+	(__ASSUME_MMAP2_SYSCALL): Remove.
+
 2012-08-15  Maxim Kuvyrkov  <maxim@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/hppa/nptl/pthread_spin_lock.c: Use generic code.

Modified: fsf/trunk/libc/ports/ChangeLog.m68k
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.m68k (original)
+++ fsf/trunk/libc/ports/ChangeLog.m68k Tue Aug 21 00:01:52 2012
@@ -1,3 +1,8 @@
+2012-08-20  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/m68k/kernel-features.h
+	(__ASSUME_MMAP2_SYSCALL): Remove.
+
 2012-08-15  Maxim Kuvyrkov  <maxim@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/m68k/nptl/pthread_spin_lock.c: Use generic code.

Modified: fsf/trunk/libc/ports/ChangeLog.tile
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.tile (original)
+++ fsf/trunk/libc/ports/ChangeLog.tile Tue Aug 21 00:01:52 2012
@@ -1,3 +1,8 @@
+2012-08-20  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/tile/kernel-features.h
+	(__ASSUME_MMAP2_SYSCALL): Remove.
+
 2012-08-14  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/tile/kernel-features.h

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h Tue Aug 21 00:01:52 2012
@@ -20,9 +20,8 @@
 /* The utimes syscall was added before 2.6.1.  */
 #define __ASSUME_UTIMES	1
 
-/* On ARM the mmap2/stat64/lstat64/fstat64 syscalls were introduced in
+/* On ARM the stat64/lstat64/fstat64 syscalls were introduced in
    2.3.35.  */
-#define __ASSUME_MMAP2_SYSCALL		1
 #define __ASSUME_STAT64_SYSCALL	1
 
 /* The signal frame layout changed in 2.6.18.  */

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h Tue Aug 21 00:01:52 2012
@@ -23,7 +23,6 @@
    and expect the final version here.  */
 #define __ASSUME_32BITUIDS		1
 #define __ASSUME_TRUNCATE64_SYSCALL	1
-#define __ASSUME_MMAP2_SYSCALL		1
 #define __ASSUME_STAT64_SYSCALL		1
 #define __ASSUME_IPC64			1
 #define __ASSUME_ST_INO_64_BIT		1

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h Tue Aug 21 00:01:52 2012
@@ -18,7 +18,6 @@
    <http://www.gnu.org/licenses/>.  */
 
 /* These features were surely available with 2.4.12.  */
-#define __ASSUME_MMAP2_SYSCALL		1
 #define __ASSUME_STAT64_SYSCALL	1
 
 /* Many syscalls were added in 2.6.10 for m68k.  */

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/tile/kernel-features.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/tile/kernel-features.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/tile/kernel-features.h Tue Aug 21 00:01:52 2012
@@ -18,7 +18,6 @@
 
 
 /* TILE glibc support starts with 2.6.36, guaranteeing many kernel features. */
-#define __ASSUME_MMAP2_SYSCALL		1
 #define __ASSUME_STAT64_SYSCALL		1
 #define __ASSUME_UTIMES			1
 #define __ASSUME_FADVISE64_64_SYSCALL	1

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/mmap.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/mmap.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/mmap.S Tue Aug 21 00:01:52 2012
@@ -24,10 +24,6 @@
 	.text
 
 ENTRY (__mmap)
-
-/* I don't think it is worthwhile trying to use mmap2 whenever it
-   is available.  Only use it when we are sure the syscall exists.  */
-#ifdef __ASSUME_MMAP2_SYSCALL
 
 	/* Save registers.  */
 	pushl %ebp
@@ -73,25 +69,6 @@
 	cfi_adjust_cfa_offset (-4)
 	cfi_restore (ebp)
 
-#else
-
-	/* Save registers.  */
-	movl %ebx, %edx
-	cfi_register (ebx, edx)
-
-	movl $SYS_ify(mmap), %eax	/* System call number in %eax.  */
-
-	lea 4(%esp), %ebx		/* Address of args is 1st arg.  */
-
-	/* Do the system call trap.  */
-	int $0x80
-
-	/* Restore registers.  */
-	movl %edx, %ebx
-	cfi_restore (ebx)
-
-#endif
-
 	/* If 0 > %eax > -4096 there was an error.  */
 	cmpl $-4096, %eax
 	ja SYSCALL_ERROR_LABEL

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/mmap64.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/mmap64.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/mmap64.S Tue Aug 21 00:01:52 2012
@@ -36,8 +36,6 @@
 
 	.text
 ENTRY (BP_SYM (__mmap64))
-
-#ifdef __NR_mmap2
 
 	/* Save registers.  */
 	pushl %ebp
@@ -88,12 +86,6 @@
 	cfi_adjust_cfa_offset (-4)
 	cfi_restore (ebp)
 
-#ifndef __ASSUME_MMAP2_SYSCALL
-2:
-	cmp $-ENOSYS, %eax
-	je 3f
-#endif
-
 	/* If 0 > %eax > -4096 there was an error.  */
 	cmpl $-4096, %eax
 	ja SYSCALL_ERROR_LABEL
@@ -122,42 +114,6 @@
 	cfi_restore (ebp)
 	movl $-EINVAL, %eax
 	jmp SYSCALL_ERROR_LABEL
-#endif
-
-#if !defined __ASSUME_MMAP2_SYSCALL || !defined __NR_mmap2
-3:
-	/* Save registers.  */
-	movl %ebx, %edx
-	cfi_register (ebx, edx)
-
-	cmpl $0, OFFHI-SVRSP(%esp)
-	jne L(einval2)
-
-	movl $SYS_ify(mmap), %eax	/* System call number in %eax.  */
-
-	lea ADDR-SVRSP(%esp), %ebx	/* Address of args is 1st arg.  */
-
-	/* Do the system call trap.  */
-	ENTER_KERNEL
-
-	/* Restore registers.  */
-	movl %edx, %ebx
-	cfi_restore (ebx)
-
-	/* If 0 > %eax > -4096 there was an error.  */
-	cmpl $-4096, %eax
-	ja SYSCALL_ERROR_LABEL
-
-	/* Successful; return the syscall's value.  */
-	ret
-
-	cfi_register (ebx, edx)
-L(einval2):
-	movl %edx, %ebx
-	cfi_restore (ebx)
-	movl $-EINVAL, %eax
-	jmp SYSCALL_ERROR_LABEL
-#endif
 
 PSEUDO_END (BP_SYM (__mmap64))
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h Tue Aug 21 00:01:52 2012
@@ -40,20 +40,14 @@
 /* The sendfile syscall was introduced in 2.2.0.  */
 #define __ASSUME_SENDFILE		1
 
-/* On x86 the mmap2 syscall was introduced in 2.3.31.  */
-#ifdef __i386__
-# define __ASSUME_MMAP2_SYSCALL	1
-#endif
-
 /* On x86 the stat64/lstat64/fstat64 syscalls were introduced in 2.3.34.  */
 #ifdef __i386__
 # define __ASSUME_STAT64_SYSCALL	1
 #endif
 
-/* On sparc the mmap2/stat64/lstat64/fstat64 syscalls were introduced
-   in 2.3.35.  */
+/* On sparc the stat64/lstat64/fstat64 syscalls were introduced in
+   2.3.35.  */
 #if defined __sparc__ && !defined __arch64__
-# define __ASSUME_MMAP2_SYSCALL		1
 # define __ASSUME_STAT64_SYSCALL	1
 #endif
 
@@ -70,9 +64,8 @@
 # define __ASSUME_IPC64		1
 #endif
 
-/* SH kernels got stat64 and mmap2 during 2.4.0-test.  */
+/* SH kernels got stat64 during 2.4.0-test.  */
 #ifdef __sh__
-# define __ASSUME_MMAP2_SYSCALL		1
 # define __ASSUME_STAT64_SYSCALL	1
 #endif
 
@@ -86,12 +79,6 @@
    MIPS n32).  */
 #define __ASSUME_GETDENTS64_SYSCALL	1
 
-/* Starting with 2.4.5 kernels the mmap2 syscall made it into the official
-   kernel.  But PowerPC64 does not support a separate MMAP2 call.  */
-#if defined __powerpc__ && !defined __powerpc64__
-# define __ASSUME_MMAP2_SYSCALL		1
-#endif
-
 /* Beginning with 2.6.12 the clock and timer supports CPU clocks.  */
 #define __ASSUME_POSIX_CPU_TIMERS	1
 
@@ -100,12 +87,14 @@
 
 /* The utimes syscall has been available for some architectures
    forever.  For x86 it was introduced after 2.5.75, for x86-64,
-   ppc, and ppc64 it was introduced in 2.6.0-test3.  */
+   ppc, and ppc64 it was introduced in 2.6.0-test3, for s390 it was
+   introduced in 2.6.21-rc5.  */
 #if defined __sparc__ \
     || defined __i386__ \
     || defined __x86_64__ \
     || defined __powerpc__ \
-    || defined __sh__
+    || defined __sh__ \
+    || (defined __s390__ && __LINUX_KERNEL_VERSION >= 0x020616)
 # define __ASSUME_UTIMES	1
 #endif
 
@@ -115,13 +104,6 @@
 #if (defined __i386__ || defined __sparc__			\
      || (defined __powerpc__ && !defined __powerpc64__))
 # define __ASSUME_FADVISE64_64_SYSCALL	1
-#endif
-
-/* Starting with 2.6.0 PowerPC adds signal/swapcontext support for Vector
-   SIMD (AKA Altivec, VMX) instructions and register state.  This changes
-   the overall size of the sigcontext and adds the swapcontext syscall.  */
-#ifdef __powerpc__
-# define __ASSUME_SWAPCONTEXT_SYSCALL	1
 #endif
 
 /* On sparc64 stat64/lstat64/fstat64 syscalls were introduced in 2.6.12.  */

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/mmap64.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/mmap64.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/mmap64.c Tue Aug 21 00:01:52 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999,2000,2001,2002,2006,2010 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@xxxxxxxxxx>, 1999.
 
@@ -26,76 +26,42 @@
 
 #include <kernel-features.h>
 
-#ifdef __NR_mmap2
-
 /* This is always 12, even on architectures where PAGE_SHIFT != 12.  */
-# if MMAP2_PAGE_SHIFT == -1
+#if MMAP2_PAGE_SHIFT == -1
 static int page_shift;
-# else
-#  ifndef MMAP2_PAGE_SHIFT
-#   define MMAP2_PAGE_SHIFT 12
-#  endif
-# define page_shift MMAP2_PAGE_SHIFT
+#else
+# ifndef MMAP2_PAGE_SHIFT
+#  define MMAP2_PAGE_SHIFT 12
 # endif
-
-# ifndef __ASSUME_MMAP2_SYSCALL
-static int have_no_mmap2;
-# endif
+#define page_shift MMAP2_PAGE_SHIFT
 #endif
 
 
 void *
 __mmap64 (void *addr, size_t len, int prot, int flags, int fd, off64_t offset)
 {
-#ifdef __NR_mmap2
-# if MMAP2_PAGE_SHIFT == -1
+#if MMAP2_PAGE_SHIFT == -1
   if (page_shift == 0)
     {
       int page_size = getpagesize ();
       while ((1 << ++page_shift) != page_size)
 	;
     }
-# endif
+#endif
   if (offset & ((1 << page_shift) - 1))
     {
       __set_errno (EINVAL);
       return MAP_FAILED;
     }
-# ifndef __ASSUME_MMAP2_SYSCALL
-  if (! have_no_mmap2)
-# endif
-    {
-# ifndef __ASSUME_MMAP2_SYSCALL
-      int saved_errno = errno;
-# endif
-      void *result;
-      __ptrvalue (result) = (void *__unbounded)
-	INLINE_SYSCALL (mmap2, 6, __ptrvalue (addr),
-			len, prot, flags, fd,
-			(off_t) (offset >> MMAP2_PAGE_SHIFT));
-# if __BOUNDED_POINTERS__
-      __ptrlow (result) = __ptrvalue (result);
-      __ptrhigh (result) = __ptrvalue (result) + len;
-# endif
-# ifndef __ASSUME_MMAP2_SYSCALL
-      if (result != MAP_FAILED || errno != ENOSYS)
-# endif
-	return result;
-
-# ifndef __ASSUME_MMAP2_SYSCALL
-      __set_errno (saved_errno);
-      have_no_mmap2 = 1;
-# endif
-    }
+  void *result;
+  __ptrvalue (result) = (void *__unbounded)
+    INLINE_SYSCALL (mmap2, 6, __ptrvalue (addr),
+		    len, prot, flags, fd,
+		    (off_t) (offset >> MMAP2_PAGE_SHIFT));
+#if __BOUNDED_POINTERS__
+  __ptrlow (result) = __ptrvalue (result);
+  __ptrhigh (result) = __ptrvalue (result) + len;
 #endif
-#ifndef __ASSUME_MMAP2_SYSCALL
-  if (offset != (off_t) offset || (offset + len) != (off_t) (offset + len))
-    {
-      __set_errno (EINVAL);
-      return MAP_FAILED;
-    }
-
-  return __mmap (addr, len, prot, flags, fd, (off_t) offset);
-#endif
+  return result;
 }
 weak_alias (__mmap64, mmap64)

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S Tue Aug 21 00:01:52 2012
@@ -32,7 +32,6 @@
 /* Size of ucontext in GLIBC_2.3.4 and later.  */
 #define _UC_SIZE_2_3_4	1184
 
-#ifdef __ASSUME_SWAPCONTEXT_SYSCALL
 	.section ".text";
 ENTRY (__getcontext)
 	li	r4,0
@@ -45,9 +44,6 @@
 1:
 	b	__syscall_error@local
 END(__getcontext)
-#else
-# include "getcontext-common.S"
-#endif
 
 versioned_symbol (libc, __getcontext, getcontext, GLIBC_2_3_4)
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S Tue Aug 21 00:01:52 2012
@@ -1,5 +1,5 @@
 /* Jump to a new context.
-   Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2002-2012 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
@@ -32,7 +32,6 @@
 /* Size of ucontext in GLIBC_2.3.4 and later.  */
 #define _UC_SIZE_2_3_4	1184
 
-#ifdef __ASSUME_SWAPCONTEXT_SYSCALL
 	.section ".text";
 ENTRY (__setcontext)
 	mr	r4,r3
@@ -46,9 +45,6 @@
 1:
 	b	__syscall_error@local
 END(__setcontext)
-#else
-# include "setcontext-common.S"
-#endif
 
 versioned_symbol (libc, __setcontext, setcontext, GLIBC_2_3_4)
 

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S Tue Aug 21 00:01:52 2012
@@ -1,5 +1,5 @@
 /* Save current context and jump to a new context.
-   Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2002-2012 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
@@ -32,7 +32,6 @@
 /* Size of ucontext in GLIBC_2.3.4 and later.  */
 #define _UC_SIZE_2_3_4	1184
 
-#ifdef __ASSUME_SWAPCONTEXT_SYSCALL
 	.section ".text";
 ENTRY (__swapcontext)
 	li	r5,_UC_SIZE_2_3_4;
@@ -44,9 +43,6 @@
 1:
 	b	__syscall_error@local
 END(__swapcontext)
-#else
-# include "swapcontext-common.S"
-#endif
 
 versioned_symbol (libc, __swapcontext, swapcontext, GLIBC_2_3_4)
 

Removed: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/getrlimit.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/getrlimit.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/getrlimit.c (removed)
@@ -1,1 +1,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S Tue Aug 21 00:01:52 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@xxxxxxxxxx).
    This file is part of the GNU C Library.
 
@@ -40,8 +40,8 @@
 	cfi_adjust_cfa_offset (120)
 	st      %r1,0(%r15)             /* store back chain */
 
-	/* Store parameters on stack, because old_mmap/mmap2
-	 * take only one parameter: a pointer to the parameter area
+	/* Store parameters on stack, because mmap2
+	 * takes only one parameter: a pointer to the parameter area
 	 */
 	st      %r6,0x70(%r15)          /* Store 'fd'.      */
 	st      %r5,0x6C(%r15)          /* Store 'flags'.   */
@@ -50,10 +50,6 @@
 	st      %r2,0x60(%r15)          /* Store 'start'.   */
 	l       %r1,216(%r15)           /* Load offset.     */
 
-#ifdef __ASSUME_MMAP2_SYSCALL
-	/* I don't think it is worthwhile trying to use mmap2 whenever 
-	 * it is available.  Only use it when we are sure the syscall
-	 * exists.  */
 	tml     %r1,0x0fff              /* Offset page aligned ?  */
 	lhi     %r2,-EINVAL
 	jnz     1f                      /* No -> EINVAL.  */
@@ -61,11 +57,6 @@
 	st      %r1,0x74(%r15)          /* Store page offset.  */
 	la      %r2,0x60(%r15)          /* Load address of parameter list.  */
 	svc     SYS_ify(mmap2)          /* Do the system call trap.  */
-#else	
-	st      %r1,0x74(%r15)          /* Store offset unmodified.  */
-	la      %r2,0x60(%r15)          /* Load address of parameter list.  */
-	svc     SYS_ify(mmap)           /* Do the system call trap.  */
-#endif
 
 1:	l       %r15,0(%r15)            /* Load back chain.  */
 	cfi_adjust_cfa_offset (-120)

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S Tue Aug 21 00:01:52 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@xxxxxxxxxx).
    This file is part of the GNU C Library.
 
@@ -41,15 +41,14 @@
 	cfi_adjust_cfa_offset (120)
 	st	%r1,0(%r15)		/* Store back chain.  */
 
-	/* Store parameters on stack, because mmap2 and old_mmap
-	 * take only one parameter: a pointer to the parameter area.  */
+	/* Store parameters on stack, because mmap2
+	 * takes only one parameter: a pointer to the parameter area.  */
 	st	%r6,0x70(%r15)		/* Store 'fd'.	    */
 	st	%r5,0x6C(%r15)		/* Store 'flags'.   */
 	st	%r4,0x68(%r15)		/* Store 'prot'.    */
 	st	%r3,0x64(%r15)		/* Store 'length'.  */
 	st	%r2,0x60(%r15)		/* Store 'start'.   */
 
-#ifdef __NR_mmap2
 	lm	%r0,%r1,216(%r15)	/* Load 64 bit offset.	*/
 	tml	%r1,0x0fff		/* Offset page aligned ?  */
 	jnz	2f			/* No -> EINVAL.  */
@@ -60,11 +59,6 @@
 
 	la	%r2,0x60(%r15)		/* Load address of parameter list.  */
 	svc	SYS_ify(mmap2)		/* Do the system call trap.  */
-
-#ifndef __ASSUME_MMAP2_SYSCALL
-	chi	%r2,-ENOSYS
-	je	1f
-#endif
 
 	l	%r15,0(%r15)		/* Load back chain.  */
 	cfi_adjust_cfa_offset (-120)
@@ -78,31 +72,6 @@
 	/* Successful; return the syscall's value.  */
 	br	%r14
 
-#endif
-
-#if !defined __ASSUME_MMAP2_SYSCALL || !defined __NR_mmap2
-1:	lm	%r0,%r1,216(%r15)	/* Load 64 bit offset.	*/
-	st	%r1,0x74(%r15)		/* Store lower word of offset.	*/
-	ltr	%r0,%r0			/* Offset > 2^32 ?  */
-	jnz	2f
-	alr	%r1,%r3			/* Add length to offset.  */
-	brc	3,2f			/* Carry -> EINVAL.  */
-
-	la	%r2,0x60(%r15)		/* Load address of parameter list.  */
-	svc	SYS_ify(mmap)	/* Do the system call trap.  */
-
-	l	%r15,0(%r15)		/* Load back chain.  */
-	lm	%r6,%r15,24(%r15)	/* Load registers.  */
-
-	/* Check gpr 2 for error.  */
-	lhi	%r0,-4096
-	clr	%r2,%r0
-	jnl	SYSCALL_ERROR_LABEL
-
-	/* Successful; return the syscall's value.  */
-	br	%r14
-#endif
-
 2:	lhi	%r2,-EINVAL
 	l	%r15,0(%r15)		/* Load back chain.  */
 	lm	%r6,%r15,24(%r15)	/* Load registers.  */

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits