Hello community,

here is the log from the commit of package glibc for openSUSE:Factory
checked in at Mon Sep 26 10:05:42 CEST 2011.



--------
--- glibc/glibc.changes 2011-09-03 21:43:26.000000000 +0200
+++ /mounts/work_src_done/STABLE/glibc/glibc.changes    2011-09-22 
21:07:52.000000000 +0200
@@ -1,0 +2,60 @@
+Thu Sep 22 21:07:43 CEST 2011 - dmuel...@suse.de
+
+- fix ports build
+
+-------------------------------------------------------------------
+Thu Sep 22 13:10:02 UTC 2011 - adr...@suse.de
+
+- add armv8l architecture
+- don't enforce armv5tel for all arm architectures anymore
+
+-------------------------------------------------------------------
+Mon Sep 19 08:09:40 UTC 2011 - opens...@cboltz.de
+
+- move usr.sbin.nscd apparmor profile back to apparmor-profiles package
+  (bnc#647718)
+
+-------------------------------------------------------------------
+Mon Sep 19 07:45:36 UTC 2011 - a...@suse.de
+
+- Update to 2.14 git version 69c1dfc1a796, it contains backports from
+  glibc trunk:
+  + Fix setxid race handling exiting threads
+  + Fix cfi directives in x86-64 and i386 code
+  + Fix scope handling during dl_close
+  + Fix spurious nop at start of __strspn_ia32
+  + Correct cycle detection during dependency sorting
+  + Fix fopen (non-existing-file, "re") errno (Obsoletes patch
+  fopen-close-exec.patch)
+
+-------------------------------------------------------------------
+Fri Sep 16 11:20:29 UTC 2011 - mma...@suse.cz
+
+- Fix assertion error in res_query.c, triggered by Firefox
+  (bso#13013).
+
+-------------------------------------------------------------------
+Wed Sep  7 07:17:16 UTC 2011 - a...@suse.de
+
+- Avoid usage of vsyscalls inside glibc.
+
+-------------------------------------------------------------------
+Tue Sep  6 09:53:24 CEST 2011 - a...@suse.de
+
+- Prefer real syscalls instead of vsyscalls on x86-64 outside
+  libc.so
+
+-------------------------------------------------------------------
+Mon Sep  5 10:06:23 UTC 2011 - a...@suse.de
+
+- Do not not trigger an abort when an i586 Intel CPU is running the
+  i686 library, as valgrind does. [bnc#681398]
+
+-------------------------------------------------------------------
+Mon Sep  5 08:26:24 UTC 2011 - a...@suse.de
+
+- Readd vdso support.
+- Add patch to relocate objects in dependency order, this fixes the
+  vdso support.
+
+-------------------------------------------------------------------
@@ -4 +64 @@
-- Revert last change, it caused some breakage.
+- Revert last change, it caused some breakage. [bnc#715854] 

calling whatdependson for head-i586


Old:
----
  fopen-close-exec.patch
  glibc-2.14-4eddf93f5cc2.tar.bz2
  minmem
  usr.sbin.nscd

New:
----
  glibc-2.14-69c1dfc1a796.tar.bz2
  glibc-2.15-avoid-vsyscall.patch
  glibc-2.15-vsyscall.patch
  glibc-resolv-assert.diff
  x86-cpuid-level2.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ glibc.spec ++++++
--- /var/tmp/diff_new_pack.KOJ2lh/_old  2011-09-26 10:05:34.000000000 +0200
+++ /var/tmp/diff_new_pack.KOJ2lh/_new  2011-09-26 10:05:34.000000000 +0200
@@ -82,11 +82,10 @@
 Release:        11
 Url:            http://www.gnu.org/software/libc/libc.html
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-Source:         glibc-%{version}-4eddf93f5cc2.tar.bz2
+Source:         glibc-%{version}-69c1dfc1a796.tar.bz2
 Source2:        http://ftp.gnu.org/gnu/glibc/glibc-ports-2.14.tar.bz2
 Source3:        noversion.tar.bz2
 Source4:        manpages.tar.bz2
-Source5:        usr.sbin.nscd
 Source8:        nsswitch.conf
 Source9:        nscd.init
 Source10:       bindresvport.blacklist
@@ -198,8 +197,14 @@
 Patch67:        glibc-revert-fseek-on-fclose.diff
 # PATCH-FIX-OPENSUSE Fix crash (access-after-free) in dl_lookup_x bnc#703140 
m...@suse.de
 Patch68:        glibc-fix-lookup-crash.patch
-# PATCH-FIX-UPSTREAM Fix fopen("non-existing-file", "re") errno bnc#713146 
a...@suse.de
-Patch69:        fopen-close-exec.patch
+# PATCH-FIX-UPSTREAM Add vdso support to support Linux 3.1, fix order of 
relocations a...@suse.de
+Patch70:        glibc-2.15-vsyscall.patch
+# PATCH-FIX-OPENSUSE Do not trigger an abort when an i586 Intel CPU is running 
the i686 library, as valgrind does. bnc#681398 a...@suse.de
+Patch71:        x86-cpuid-level2.patch
+# PATCH-FIX-UPSTREAM Avoid use of vsyscall a...@suse.de
+Patch72:        glibc-2.15-avoid-vsyscall.patch
+# PATCH-FIX-UPSTREAM Fix assertion error in res_query.c (bso#13013)
+Patch73:        glibc-resolv-assert.diff
 # PATCH-FEATURE-OPENSUSE -- add sha support to crypt_blowfish lnus...@suse.de
 Patch80:        crypt_blowfish-1.2-sha.diff
 # PATCH-FEATURE-OPENSUSE -- use separate symbol version for Owl extensions - 
lnus...@suse.de
@@ -317,7 +322,6 @@
 
 %package devel-static
 
-
 Summary:        C library static libraries for -static linking
 Group:          Development/Libraries/C and C++
 Requires:       %{name}-devel = %{version}
@@ -361,10 +365,8 @@
 %endif
 
 %prep
-%ifarch %arm armv5tel armv7l
+%ifarch %arm armv5tel armv7l armv8l
 # add glibc-ports for arm
-# this is CURRENTLY BROKEN (as of 2009-11-13); ARM-interested
-# contributors need to provide new tested glibc-ports source
 %setup -n glibc-%{version} -q -a 2 -a 3 -a 4
 %else
 # any other leave out ports
@@ -434,7 +436,10 @@
 %patch66 -p1
 %patch67 -p1
 %patch68 -p1
-%patch69 -p1
+%patch70 -p1
+%patch71 -p1
+%patch72 -p1
+%patch73 -p1
 
 #
 # Inconsistency detected by ld.so: dl-close.c: 719: _dl_close: Assertion 
`map->l_init_called' failed!
@@ -527,9 +532,9 @@
 %ifarch %ix86
        add_ons=$add_ons,noversion
 %endif
-%ifarch %arm armv5tel armv7l
-       add_ons=$add_ons,ports
-       BuildFlags="-march=armv5te -O2 -Wall"
+%ifarch %arm armv5tel armv7l armv8l
+       add_ons=$add_ons,glibc-ports-%{version}
+       BuildFlags="$BuildFlags -fasynchronous-unwind-tables"
        # fails to build otherwise - need to recheck and fix
        %define enable_stackguard_randomization 0
 %endif
@@ -548,7 +553,7 @@
 %if %{enable_stackguard_randomization}
                --enable-stackguard-randomization \
 %endif
-%ifarch %arm armv5tel armv7l
+%ifarch %arm armv5tel armv7l armv8l
                --build=%{_target_cpu}-suse-linux-gnueabi \
 %else
                --build=%{_target_cpu}-suse-linux \
@@ -781,8 +786,6 @@
 # nscd tools:
 
 cp nscd/nscd.conf %{buildroot}/etc
-mkdir -p %{buildroot}/etc/apparmor.d
-cp $RPM_SOURCE_DIR/usr.sbin.nscd %{buildroot}/etc/apparmor.d
 mkdir -p %{buildroot}/etc/init.d
 install -m 755 $RPM_SOURCE_DIR/nscd.init %{buildroot}/etc/init.d/nscd
 ln -sf /etc/init.d/nscd %{buildroot}/usr/sbin/rcnscd
@@ -920,7 +923,7 @@
                        %ifarch x86_64
                                /%{_lib}/ld-linux-x86-64.so.2
                        %else
-                               %ifarch %arm armv5tel armv7l
+                               %ifarch %arm armv5tel armv7l armv8l
                                        /%{_lib}/ld-linux.so.3
                                %else
                                        /%{_lib}/ld-linux.so.2
@@ -1088,8 +1091,6 @@
 %files -n nscd
 %defattr(-,root,root)
 %config(noreplace) /etc/nscd.conf
-%dir /etc/apparmor.d
-%config /etc/apparmor.d/usr.sbin.nscd
 %config /etc/init.d/nscd
 %{_sbindir}/nscd
 %{_sbindir}/rcnscd


++++++ glibc-2.14-4eddf93f5cc2.tar.bz2 -> glibc-2.14-69c1dfc1a796.tar.bz2 ++++++
glibc/glibc-2.14-4eddf93f5cc2.tar.bz2 
/mounts/work_src_done/STABLE/glibc/glibc-2.14-69c1dfc1a796.tar.bz2 differ: char 
11, line 1

++++++ glibc-2.15-avoid-vsyscall.patch ++++++
commit d53a73acdbf6ac6eb99cd06f5dd695da58d9e8f5
Author: Ulrich Drepper <drep...@gmail.com>
Date:   Tue Sep 6 20:22:37 2011 -0400

    Avoid gettimeofday vsyscall

2011-09-06  Ulrich Drepper  <drep...@gmail.com>

        * sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs): Don't use
        gettimeofday vsyscall, just use time.

diff --git a/sysdeps/unix/sysv/linux/getsysstats.c 
b/sysdeps/unix/sysv/linux/getsysstats.c
index b9bae3d..7feb7a1 100644
--- a/sysdeps/unix/sysv/linux/getsysstats.c
+++ b/sysdeps/unix/sysv/linux/getsysstats.c
@@ -37,15 +37,6 @@
 #include <not-cancel.h>
 #include <kernel-features.h>
 
-#ifndef HAVE_CLOCK_GETTIME_VSYSCALL
-# undef INTERNAL_VSYSCALL
-# define INTERNAL_VSYSCALL INTERNAL_SYSCALL
-# undef INLINE_VSYSCALL
-# define INLINE_VSYSCALL INLINE_SYSCALL
-#else
-# include <bits/libc-vdso.h>
-#endif
-
 
 /* How we can determine the number of available processors depends on
    the configuration.  There is currently (as of version 2.0.21) no
@@ -141,17 +132,10 @@ __get_nprocs ()
   static int cached_result;
   static time_t timestamp;
 
-#ifdef __ASSUME_POSIX_TIMERS
-  struct timespec ts;
-  INTERNAL_SYSCALL_DECL (err);
-  INTERNAL_VSYSCALL (clock_gettime, err, 2, CLOCK_REALTIME, &ts);
-#else
-  struct timeval ts;
-  __gettimeofday (&ts, NULL);
-#endif
+  time_t now = time (NULL);
   time_t prev = timestamp;
   atomic_read_barrier ();
-  if (ts.tv_sec == prev)
+  if (now == prev)
     return cached_result;
 
   /* XXX Here will come a test for the new system call.  */
@@ -243,7 +227,7 @@ __get_nprocs ()
  out:
   cached_result = result;
   atomic_write_barrier ();
-  timestamp = ts.tv_sec;
+  timestamp = now;
 
   return result;
 }

commit a77d3c17dc6517636c1cf6ab9c6bb8c257772354
Author: Ulrich Drepper <drep...@gmail.com>
Date:   Tue Sep 6 21:34:11 2011 -0400

    Don't unconditionally use clock_gettime vsyscall on x86-64

2011-09-06  Ulrich Drepper  <drep...@gmail.com>

        * sysdeps/unix/sysv/linux/x86_64/clock_gettime.c: New file.
        * sysdeps/unix/sysv/linux/clock_gettime.c (SYSCALL_GETTIME): Allow
        already be defined.  Change to take two parameters and don't assign
        result to variable.  Adjust all users.
        Define INTERNAL_GETTIME if not already defined.
        Use INTERNAL_GETTIME instead of INTERNAL_VSYSCALL got clock_gettime
        call.
        * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Don't define
        HAVE_CLOCK_GETTIME_VSYSCALL.
        * sysdeps/unix/clock_gettime.c: Adjust use of SYSDEP_GETTIME_CPU.

 
diff --git a/sysdeps/unix/clock_gettime.c b/sysdeps/unix/clock_gettime.c
index fbaaf30..d467f2b 100644
--- a/sysdeps/unix/clock_gettime.c
+++ b/sysdeps/unix/clock_gettime.c
@@ -1,5 +1,5 @@
 /* clock_gettime -- Get the current time from a POSIX clockid_t.  Unix version.
-   Copyright (C) 1999-2004, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999-2004, 2005, 2007, 2011 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
@@ -113,7 +113,7 @@ clock_gettime (clockid_t clock_id, struct timespec *tp)
 
     default:
 #ifdef SYSDEP_GETTIME_CPU
-      SYSDEP_GETTIME_CPU;
+      retval = SYSDEP_GETTIME_CPU (clock_id, tp);
 #endif
 #if HP_TIMING_AVAIL
       if ((clock_id & ((1 << CLOCK_IDFIELD_SIZE) - 1))
diff --git a/sysdeps/unix/sysv/linux/clock_gettime.c 
b/sysdeps/unix/sysv/linux/clock_gettime.c
index dd3755c..0ae45de 100644
--- a/sysdeps/unix/sysv/linux/clock_gettime.c
+++ b/sysdeps/unix/sysv/linux/clock_gettime.c
@@ -1,5 +1,5 @@
 /* clock_gettime -- Get current time from a POSIX clockid_t.  Linux version.
-   Copyright (C) 2003,2004,2005,2006,2007,2010 Free Software Foundation, Inc.
+   Copyright (C) 2003,2004,2005,2006,2007,2010,2011 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,9 +32,14 @@
 # include <bits/libc-vdso.h>
 #endif
 
-#define SYSCALL_GETTIME \
-  retval = INLINE_VSYSCALL (clock_gettime, 2, clock_id, tp); \
-  break
+#ifndef SYSCALL_GETTIME
+# define SYSCALL_GETTIME(id, tp) \
+  INLINE_VSYSCALL (clock_gettime, 2, id, tp)
+#endif
+#ifndef INTERNAL_GETTIME
+# define INTERNAL_GETTIME(id, tp) \
+  INTERNAL_VSYSCALL (clock_gettime, err, 2, id, tp)
+#endif
 
 #ifdef __ASSUME_POSIX_TIMERS
 
@@ -44,7 +49,8 @@
   SYSDEP_GETTIME_CPUTIME                                                     \
   case CLOCK_REALTIME:                                                       \
   case CLOCK_MONOTONIC:                                                        
      \
-    SYSCALL_GETTIME
+    retval = SYSCALL_GETTIME (clock_id, tp);                                 \
+    break
 
 # define __libc_missing_posix_timers 0
 #elif defined __NR_clock_gettime
@@ -59,7 +65,7 @@ maybe_syscall_gettime (clockid_t clock_id, struct timespec 
*tp)
   if (!__libc_missing_posix_timers)
     {
       INTERNAL_SYSCALL_DECL (err);
-      int r = INTERNAL_VSYSCALL (clock_gettime, err, 2, clock_id, tp);
+      int r = INTERNAL_GETTIME (clock_id, tp);
       if (!INTERNAL_SYSCALL_ERROR_P (r, err))
        return 0;
 
@@ -89,7 +95,7 @@ maybe_syscall_gettime (clockid_t clock_id, struct timespec 
*tp)
     /* Fallback code.  */                                                    \
     if (retval == EINVAL && clock_id == CLOCK_REALTIME)                        
      \
       retval = realtime_gettime (tp);                                        \
-    else                                                                     \
+    else                                                                     \
       {                                                                        
      \
        __set_errno (retval);                                                 \
        retval = -1;                                                          \
@@ -119,7 +125,7 @@ maybe_syscall_gettime_cpu (clockid_t clock_id, struct 
timespec *tp)
   if (!__libc_missing_posix_cpu_timers)
     {
       INTERNAL_SYSCALL_DECL (err);
-      int r = INTERNAL_VSYSCALL (clock_gettime, err, 2, clock_id, tp);
+      int r = INTERNAL_GETTIME (clock_id, tp);
       if (!INTERNAL_SYSCALL_ERROR_P (r, err))
        return 0;
 
diff --git a/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c 
b/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
new file mode 100644
index 0000000..9d6cd23
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
@@ -0,0 +1,10 @@
+#include "bits/libc-vdso.h"
+
+#ifdef SHARED
+# define SYSCALL_GETTIME(id, tp) \
+  (*__vdso_clock_gettime) (id, tp)
+# define INTERNAL_GETTIME(id, tp) \
+  (*__vdso_clock_gettime) (id, tp)
+#endif
+
+#include "../clock_gettime.c"
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h 
b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index 2b9ea85..a9821dc 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2005, 2007, 2011 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
@@ -279,8 +279,8 @@
     if (INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err))                           \
       {                                                                        
      \
       iserr:                                                                 \
-        __set_errno (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err));               \
-        sc_ret = -1L;                                                        \
+       __set_errno (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err));                \
+       sc_ret = -1L;                                                         \
       }                                                                        
      \
   out:                                                                       \
     sc_ret;                                                                  \
@@ -304,9 +304,6 @@
     v_ret;                                                                   \
   })
 
-/* List of system calls which are supported as vsyscalls.  */
-#  define HAVE_CLOCK_GETTIME_VSYSCALL  1
-
 # else
 #  define INLINE_VSYSCALL(name, nr, args...) \
   INLINE_SYSCALL (name, nr, ##args)

commit a0e1f41bd487d2202b6c1e0802c0e6c91630fbea
Author: Ulrich Drepper <drep...@gmail.com>
Date:   Tue Sep 6 23:17:53 2011 -0400

    Don't call gettimeofday vsyscall in x86-64 sem_timedwait

2011-09-06  Ulrich Drepper  <drep...@gmail.com>

        * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
        use gettimeofday vsyscall, just call gettimeofday.

diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S 
b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
index ca49cb8..2926b36 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002,2003,2005,2007,2009,2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2005,2007,2009,2010,2011 Free Software Foundation, 
Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drep...@redhat.com>, 2002.
 
@@ -24,10 +24,6 @@
 #include <pthread-errnos.h>
 #include <structsem.h>
 
-
-/* For the calculation see asm/vsyscall.h.  */
-#define VSYSCALL_ADDR_vgettimeofday    0xffffffffff600000
-
        .text
 
        .globl  sem_timedwait
@@ -212,9 +208,10 @@ sem_timedwait:
        addq    $1, NWAITERS(%r12)
 
 7:     xorl    %esi, %esi
-       movq    %rsp, %rdi
-       movq    $VSYSCALL_ADDR_vgettimeofday, %rax
-       callq   *%rax
+       movq    %rsp,%rdi
+       /* This call works because we directly jump to a system call entry
+          which preserves all the registers.  */
+       call    JUMPTARGET(__gettimeofday)
 
        /* Compute relative timeout.  */
        movq    8(%rsp), %rax

commit fc8bffcccf5821bca179486abef83a7f82526715
Author: Ulrich Drepper <drep...@gmail.com>
Date:   Tue Sep 6 23:50:04 2011 -0400

    Fix handling of __vdso_clock_gettime

2011-09-06  Ulrich Drepper  <drep...@gmail.com>

        * sysdeps/unix/sysv/linux/x86_64/clock_gettime.c (INTERNAL_GETTIME):
        Forgot to demangle the pointer.

diff --git a/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c 
b/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
index 9d6cd23..7802701 100644
--- a/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
+++ b/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
@@ -2,9 +2,13 @@
 
 #ifdef SHARED
 # define SYSCALL_GETTIME(id, tp) \
-  (*__vdso_clock_gettime) (id, tp)
+  ({ long int (*f) (clockid_t, struct timespec *) = __vdso_clock_gettime; \
+  PTR_DEMANGLE (f);                                                      \
+  f (id, tp); })
 # define INTERNAL_GETTIME(id, tp) \
-  (*__vdso_clock_gettime) (id, tp)
+  ({ long int (*f) (clockid_t, struct timespec *) = __vdso_clock_gettime; \
+  PTR_DEMANGLE (f);                                                      \
+  f (id, tp); })
 #endif
 
 #include "../clock_gettime.c"

commit 9e5c9dcd57e80cd56c47fd2bf11de8d167176a0e
Author: Ulrich Drepper <drep...@gmail.com>
Date:   Wed Sep 7 00:14:06 2011 -0400

    Remove gettimeofday vsyscall use from x86-86 libpthread

        * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
        * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
        * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
        Likewise.
        * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
        Likewise.
        * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
        Simplify __vdso_clock_gettime use.
 
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S 
b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
index 3195db2..018da0c 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drep...@redhat.com>, 2002.
 
@@ -68,10 +68,6 @@
 #endif
 
 
-/* For the calculation see asm/vsyscall.h.  */
-#define VSYSCALL_ADDR_vgettimeofday    0xffffffffff600000
-
-
        .globl  __lll_lock_wait_private
        .type   __lll_lock_wait_private,@function
        .hidden __lll_lock_wait_private
@@ -250,10 +246,9 @@ __lll_timedlock_wait:
        /* Get current time.  */
        movq    %rsp, %rdi
        xorl    %esi, %esi
-       movq    $VSYSCALL_ADDR_vgettimeofday, %rax
-       /* This is a regular function call, all caller-save registers
-          might be clobbered.  */
-       callq   *%rax
+       /* This call works because we directly jump to a system call entry
+          which preserves all the registers.  */
+       call    JUMPTARGET(__gettimeofday)
 
        /* Compute relative timeout.  */
        movq    8(%rsp), %rax
@@ -402,8 +397,9 @@ __lll_timedwait_tid:
        /* Get current time.  */
 2:     movq    %rsp, %rdi
        xorl    %esi, %esi
-       movq    $VSYSCALL_ADDR_vgettimeofday, %rax
-       callq   *%rax
+       /* This call works because we directly jump to a system call entry
+          which preserves all the registers.  */
+       call    JUMPTARGET(__gettimeofday)
 
        /* Compute relative timeout.  */
        movq    8(%rsp), %rax
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S 
b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
index 5218a4f..b7b8b34 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002=2007, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2011=2007, 2009, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drep...@redhat.com>, 2002.
 
@@ -50,9 +50,6 @@
        orl     $FUTEX_WAIT_BITSET | FUTEX_CLOCK_REALTIME, reg
 #endif
 
-/* For the calculation see asm/vsyscall.h.  */
-#define VSYSCALL_ADDR_vgettimeofday    0xffffffffff600000
-
 
        .globl  __lll_robust_lock_wait
        .type   __lll_robust_lock_wait,@function
@@ -219,10 +216,9 @@ __lll_robust_timedlock_wait:
        /* Get current time.  */
        movq    %rsp, %rdi
        xorl    %esi, %esi
-       movq    $VSYSCALL_ADDR_vgettimeofday, %rax
-       /* This is a regular function call, all caller-save registers
-          might be clobbered.  */
-       callq   *%rax
+       /* This call works because we directly jump to a system call entry
+          which preserves all the registers.  */
+       call    JUMPTARGET(__gettimeofday)
 
        /* Compute relative timeout.  */
        movq    8(%rsp), %rax
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S 
b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
index 48ea8b9..d11b297 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
@@ -26,9 +26,6 @@
 
 #include <kernel-features.h>
 
-/* For the calculation see asm/vsyscall.h.  */
-#define VSYSCALL_ADDR_vgettimeofday    0xffffffffff600000
-
 
        .text
 
@@ -453,13 +450,11 @@ __pthread_cond_timedwait:
        movq    __vdso_clock_gettime@GOTPCREL(%rip), %rax
        movq    (%rax), %rax
        PTR_DEMANGLE (%rax)
-       jz      26f
        call    *%rax
-       jmp     27f
-#  endif
-26:    movl    $__NR_clock_gettime, %eax
+#  else
+       movl    $__NR_clock_gettime, %eax
        syscall
-27:
+#  endif
 #  ifndef __ASSUME_POSIX_TIMERS
        cmpq    $-ENOSYS, %rax
        je      19f
@@ -473,8 +468,9 @@ __pthread_cond_timedwait:
 # else
        leaq    24(%rsp), %rdi
        xorl    %esi, %esi
-       movq    $VSYSCALL_ADDR_vgettimeofday, %rax
-       callq   *%rax
+       /* This call works because we directly jump to a system call entry
+          which preserves all the registers.  */
+       call    JUMPTARGET(__gettimeofday)
 
        /* Compute relative timeout.  */
        movq    40(%rsp), %rax
@@ -611,8 +607,9 @@ __pthread_cond_timedwait:
        /* clock_gettime not available.  */
 19:    leaq    32(%rsp), %rdi
        xorl    %esi, %esi
-       movq    $VSYSCALL_ADDR_vgettimeofday, %rax
-       callq   *%rax
+       /* This call works because we directly jump to a system call entry
+          which preserves all the registers.  */
+       call    JUMPTARGET(__gettimeofday)
 
        /* Compute relative timeout.  */
        movq    40(%rsp), %rax
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S 
b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
index f5d055c..0e6a6ee 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2005, 2007, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2005,2007,2009,2010,2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drep...@redhat.com>, 2002.
 
@@ -23,10 +23,6 @@
 #include <pthread-errnos.h>
 #include <kernel-features.h>
 
-
-/* For the calculation see asm/vsyscall.h.  */
-#define VSYSCALL_ADDR_vgettimeofday    0xffffffffff600000
-
        .text
 
        .globl  pthread_rwlock_timedrdlock
@@ -123,8 +119,9 @@ pthread_rwlock_timedrdlock:
        /* Get current time.  */
        movq    %rsp, %rdi
        xorl    %esi, %esi
-       movq    $VSYSCALL_ADDR_vgettimeofday, %rax
-       callq   *%rax
+       /* This call works because we directly jump to a system call entry
+          which preserves all the registers.  */
+       call    JUMPTARGET(__gettimeofday)
 
        /* Compute relative timeout.  */
        movq    8(%rsp), %rax
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S 
b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
index 6ed8b49..16bf920 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 2002, 2003, 2005, 2007, 2009, 2010 Free Software Foundation, 
Inc.
+/* Copyright (C) 2002, 2003, 2005, 2007, 2009, 2010, 2011
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drep...@redhat.com>, 2002.
 
@@ -23,10 +24,6 @@
 #include <pthread-errnos.h>
 #include <kernel-features.h>
 
-
-/* For the calculation see asm/vsyscall.h.  */
-#define VSYSCALL_ADDR_vgettimeofday    0xffffffffff600000
-
        .text
 
        .globl  pthread_rwlock_timedwrlock
@@ -120,8 +117,9 @@ pthread_rwlock_timedwrlock:
        /* Get current time.  */
        movq    %rsp, %rdi
        xorl    %esi, %esi
-       movq    $VSYSCALL_ADDR_vgettimeofday, %rax
-       callq   *%rax
+       /* This call works because we directly jump to a system call entry
+          which preserves all the registers.  */
+       call    JUMPTARGET(__gettimeofday)
 
        /* Compute relative timeout.  */
        movq    8(%rsp), %rax
commit e38ba7ab6a56d53bde4fcff250f6928fb473bc3c
Author: Ulrich Drepper <drep...@gmail.com>
Date:   Wed Sep 7 00:07:08 2011 -0400

    Make sure __vdso_clock_gettime always contains a valid pointer

2011-09-07  Ulrich Drepper  <drep...@gmail.com>

        * sysdeps/unix/sysv/linux/x86_64/init-first.c
        (_libc_vdso_platform_setup): If vDSO is not present store pointer to
        syscall wrapper around clock_gettime in __vdso_clock_gettime.
        * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Add entry for
        clock_gettime.

diff --git a/sysdeps/unix/sysv/linux/x86_64/init-first.c 
b/sysdeps/unix/sysv/linux/x86_64/init-first.c
index 25cf08b..cb39aca 100644
--- a/sysdeps/unix/sysv/linux/x86_64/init-first.c
+++ b/sysdeps/unix/sysv/linux/x86_64/init-first.c
@@ -17,6 +17,8 @@
    02111-1307 USA.  */
 
 #ifdef SHARED
+# include <time.h>
+# include <sysdep.h>
 # include <dl-vdso.h>
 # include <bits/libc-vdso.h>
 
@@ -27,12 +29,17 @@ strong_alias (__vdso_clock_gettime, 
__GI___vdso_clock_gettime attribute_hidden)
 long int (*__vdso_getcpu) (unsigned *, unsigned *, void *) attribute_hidden;
 
 
+extern long int __syscall_clock_gettime (clockid_t, struct timespec *);
+
+
 static inline void
 _libc_vdso_platform_setup (void)
 {
   PREPARE_VERSION (linux26, "LINUX_2.6", 61765110);
 
   void *p = _dl_vdso_vsym ("clock_gettime", &linux26);
+  if (p == NULL)
+    p = __syscall_clock_gettime;
   PTR_MANGLE (p);
   __GI___vdso_clock_gettime = p;
 
diff --git a/sysdeps/unix/sysv/linux/x86_64/syscalls.list 
b/sysdeps/unix/sysv/linux/x86_64/syscalls.list
index 3e231a0..ccddb84 100644
--- a/sysdeps/unix/sysv/linux/x86_64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/x86_64/syscalls.list
@@ -14,6 +14,7 @@ semop         -       semop           i:ipi   __semop         
semop
 semtimedop     -       semtimedop      i:ipip  semtimedop
 semget         -       semget          i:iii   __semget        semget
 semctl         -       semctl          i:iiii  __semctl        semctl
+syscall_clock_gettime  EXTRA   clock_gettime   Ei:ip           
__syscall_clock_gettime
 
 
 # proper socket implementations:
++++++ glibc-2.15-vsyscall.patch ++++++
commit 91b392a4bab0c2dc90e7e3ff914dec20b97adca8
Author: Ulrich Drepper <drep...@gmail.com>
Date:   Sun Aug 21 13:52:28 2011 -0400

    Use ifuncs for time and gettimeofday on x86-64

2011-08-21  Ulrich Drepper  <drep...@gmail.com>

        * sysdeps/unix/sysv/linux/x86_64/gettimeofday.S: Removed.
        * sysdeps/unix/sysv/linux/x86_64/time.S: Removed.
        * sysdeps/unix/sysv/linux/x86_64/gettimeofday.c: New file.
        * sysdeps/unix/sysv/linux/x86_64/time.c: New file.
        * sysdeps/unix/sysv/linux/x86_64/bits/libc-vdso.h: Remove declaration
        of __vdso_gettimeofday.
        * sysdeps/unix/sysv/linux/x86_64/init-first.c: Remove definition of
        __vdso_gettimeofday and __vdso_time.  Define __vdso_getcpu with
        attribute_hidden.
        (_libc_vdso_platform_setup): Remove initialization of
        __vdso_gettimeofday and __vdso_time.

diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/libc-vdso.h 
b/sysdeps/unix/sysv/linux/x86_64/bits/libc-vdso.h
index d7123c9..f9bf84e 100644
--- a/sysdeps/unix/sysv/linux/x86_64/bits/libc-vdso.h
+++ b/sysdeps/unix/sysv/linux/x86_64/bits/libc-vdso.h
@@ -1,5 +1,5 @@
 /* Resolve function pointers to VDSO functions.
-   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2011 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
@@ -25,9 +25,6 @@
 
 #ifdef SHARED
 
-extern long int (*__vdso_gettimeofday) (struct timeval *, void *)
-  attribute_hidden;
-
 extern long int (*__vdso_clock_gettime) (clockid_t, struct timespec *);
 
 #endif
diff --git a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.S 
b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.S
deleted file mode 100644
index f618e73..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.S
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Copyright (C) 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
-   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 <sysdep.h>
-#define _ERRNO_H       1
-#include <bits/errno.h>
-
-/* For the calculation see asm/vsyscall.h.  */
-#define VSYSCALL_ADDR_vgettimeofday    0xffffffffff600000
-
-
-ENTRY (__gettimeofday)
-       /* Align stack.  */
-       sub     $0x8, %rsp
-       cfi_adjust_cfa_offset(8)
-#ifdef SHARED
-       movq    __vdso_gettimeofday(%rip), %rax
-       PTR_DEMANGLE (%rax)
-#else
-       movq    $VSYSCALL_ADDR_vgettimeofday, %rax
-#endif
-       callq   *%rax
-       /* Check error return.  */
-       cmpl    $-4095, %eax
-       jae     SYSCALL_ERROR_LABEL
-
-L(pseudo_end):
-       add     $0x8, %rsp
-       cfi_adjust_cfa_offset(-8)
-       ret
-PSEUDO_END(__gettimeofday)
-
-strong_alias (__gettimeofday, __gettimeofday_internal)
-weak_alias (__gettimeofday, gettimeofday)
diff --git a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c 
b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
new file mode 100644
index 0000000..1a773d6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
@@ -0,0 +1,49 @@
+/* Copyright (C) 2002, 2003, 2007, 2011 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 <dl-vdso.h>
+
+
+#define VSYSCALL_ADDR_vgettimeofday    0xffffffffff600000ul
+
+
+#ifdef SHARED
+void *gettimeofday_ifunc (void) __asm__ ("__gettimeofday");
+
+void *
+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)
+         ?: (void *) VSYSCALL_ADDR_vgettimeofday);
+}
+__asm (".type __gettimeofday, %gnu_indirect_function");
+#else
+# include <sys/time.h>
+
+int
+__gettimeofday (struct timeval *tv, struct timezone *tz)
+{
+  return ((int (*) (struct timeval *, struct timezone *)) 
VSYSCALL_ADDR_vgettimeofday) (tv, tz);
+}
+#endif
+
+weak_alias (__gettimeofday, gettimeofday)
+strong_alias (__gettimeofday, __gettimeofday_internal)
diff --git a/sysdeps/unix/sysv/linux/x86_64/init-first.c 
b/sysdeps/unix/sysv/linux/x86_64/init-first.c
index e676f62..25cf08b 100644
--- a/sysdeps/unix/sysv/linux/x86_64/init-first.c
+++ b/sysdeps/unix/sysv/linux/x86_64/init-first.c
@@ -20,15 +20,11 @@
 # include <dl-vdso.h>
 # include <bits/libc-vdso.h>
 
-long int (*__vdso_gettimeofday) (struct timeval *, void *) attribute_hidden;
-
 long int (*__vdso_clock_gettime) (clockid_t, struct timespec *)
   __attribute__ ((nocommon));
 strong_alias (__vdso_clock_gettime, __GI___vdso_clock_gettime attribute_hidden)
 
-long int (*__vdso_getcpu) (unsigned *, unsigned *, void *);
-
-long int (*__vdso_time) (time_t *) attribute_hidden;
+long int (*__vdso_getcpu) (unsigned *, unsigned *, void *) attribute_hidden;
 
 
 static inline void
@@ -36,15 +32,7 @@ _libc_vdso_platform_setup (void)
 {
   PREPARE_VERSION (linux26, "LINUX_2.6", 61765110);
 
-  void *p = _dl_vdso_vsym ("gettimeofday", &linux26);
-  /* If the vDSO is not available we fall back on the old vsyscall.  */
-#define VSYSCALL_ADDR_vgettimeofday    0xffffffffff600000ul
-  if (p == NULL)
-    p = (void *) VSYSCALL_ADDR_vgettimeofday;
-  PTR_MANGLE (p);
-  __vdso_gettimeofday = p;
-
-  p = _dl_vdso_vsym ("clock_gettime", &linux26);
+  void *p = _dl_vdso_vsym ("clock_gettime", &linux26);
   PTR_MANGLE (p);
   __GI___vdso_clock_gettime = p;
 
@@ -55,14 +43,6 @@ _libc_vdso_platform_setup (void)
     p = (void *) VSYSCALL_ADDR_vgetcpu;
   PTR_MANGLE (p);
   __vdso_getcpu = p;
-
-  p = _dl_vdso_vsym ("time", &linux26);
-  /* If the vDSO is not available we fall back on the old vsyscall.  */
-#define VSYSCALL_ADDR_vtime    0xffffffffff600400
-  if (p == NULL)
-    p = (void *) VSYSCALL_ADDR_vtime;
-  PTR_MANGLE (p);
-  __vdso_time = p;
 }
 
 # define VDSO_SETUP _libc_vdso_platform_setup
diff --git a/sysdeps/unix/sysv/linux/x86_64/time.S 
b/sysdeps/unix/sysv/linux/x86_64/time.S
deleted file mode 100644
index 66d7498..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/time.S
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright (C) 2001,02, 2003, 2011 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 <sysdep.h>
-#define _ERRNO_H       1
-#include <bits/errno.h>
-
-/* For the calculation see asm/vsyscall.h.  */
-#define VSYSCALL_ADDR_vtime    0xffffffffff600400
-
-
-/* Return the current time as a `time_t' and also put it in *T if T is
-   not NULL.  Time is represented as seconds from Jan 1 00:00:00 1970.  */
-
-ENTRY (time)
-       /* Align stack.  */
-       sub     $0x8, %rsp
-       cfi_adjust_cfa_offset(8)
-
-#ifdef SHARED
-       movq    __vdso_time(%rip), %rax
-       PTR_DEMANGLE (%rax)
-#else
-       movq    $VSYSCALL_ADDR_vtime, %rax
-#endif
-       callq   *%rax
-
-       add     $0x8, %rsp
-       cfi_adjust_cfa_offset(-8)
-       ret
-PSEUDO_END_NOERRNO(time)
-libc_hidden_def (time)
diff --git a/sysdeps/unix/sysv/linux/x86_64/time.c 
b/sysdeps/unix/sysv/linux/x86_64/time.c
new file mode 100644
index 0000000..698d561
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86_64/time.c
@@ -0,0 +1,47 @@
+/* Copyright (C) 2001,02, 2003, 2011 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 <dl-vdso.h>
+
+
+#define VSYSCALL_ADDR_vtime    0xffffffffff600400
+
+
+#ifdef SHARED
+void *time_ifunc (void) __asm__ ("time");
+
+void *
+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;
+}
+__asm (".type time, %gnu_indirect_function");
+#else
+# include <time.h>
+
+time_t
+time (time_t *t)
+{
+  return ((time_t (*) (time_t *)) VSYSCALL_ADDR_vtime) (t);
+}
+#endif
+
+strong_alias (time, __GI_time)

commit 2bc174332ba6ddbd1b855dced33889bef56e8ba3
Author: Andreas Schwab <sch...@redhat.com>
Date:   Tue Aug 30 15:37:54 2011 +0200

    Relocate objects in dependency order

2011-08-30  Andreas Schwab  <sch...@redhat.com>

        * elf/rtld.c (dl_main): Relocate objects in dependency order.

diff --git a/elf/rtld.c b/elf/rtld.c
index 87bb5f0..4f6bbfd 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -2255,13 +2255,12 @@ ERROR: ld.so: object '%s' cannot be loaded as audit 
interface: %s; ignored.\n",
       /* If we are profiling we also must do lazy reloaction.  */
       GLRO(dl_lazy) |= consider_profiling;
 
-      struct link_map *l = main_map;
-      while (l->l_next)
-       l = l->l_next;
-
       HP_TIMING_NOW (start);
-      do
+      unsigned i = main_map->l_searchlist.r_nlist;
+      while (i-- > 0)
        {
+         struct link_map *l = main_map->l_initfini[i];
+
          /* While we are at it, help the memory handling a bit.  We have to
             mark some data structures as allocated with the fake malloc()
             implementation in ld.so.  */
@@ -2280,10 +2279,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit 
interface: %s; ignored.\n",
          /* Add object to slot information data if necessasy.  */
          if (l->l_tls_blocksize != 0 && tls_init_tp_called)
            _dl_add_to_slotinfo (l);
-
-         l = l->l_prev;
        }
-      while (l);
       HP_TIMING_NOW (stop);
 
       HP_TIMING_DIFF (relocate_time, start, stop);

commit ef60624956e93df1da329a48570776ed963b1916
Author: Ulrich Drepper <drep...@gmail.com>
Date:   Tue Sep 6 00:12:18 2011 -0400

    Prefer real syscalls instead of vsyscalls on x86-64 outside libc.so

2011-09-06  Ulrich Drepper  <drep...@gmail.com>

        * sysdeps/unix/sysv/linux/kernel-features.h: Add entry for getcpu
        syscall on x86-64.
        * sysdeps/unix/sysv/linux/x86_64/gettimeofday.c [!SHARED]: Use real
        syscall.
        * sysdeps/unix/sysv/linux/x86_64/time.c: Likewise.
        * sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S [!SHARED]: Use real
        syscall if possible.


diff --git a/sysdeps/unix/sysv/linux/kernel-features.h 
b/sysdeps/unix/sysv/linux/kernel-features.h
index d91f581..58f833e 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -546,3 +546,8 @@
 #if __LINUX_KERNEL_VERSION >= 0x020627
 # define __ASSUME_SENDMMSG     1
 #endif
+
+/* getcpu is a syscall for x86-64 since 3.1.  */
+#if defined __x86_64__ && __LINUX_KERNEL_VERSION >= 0x030100
+# define __ASSUME_GETCPU_SYSCALL       1
+#endif
diff --git a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c 
b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
index 1a773d6..56171bc 100644
--- a/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
+++ b/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
@@ -37,11 +37,12 @@ gettimeofday_ifunc (void)
 __asm (".type __gettimeofday, %gnu_indirect_function");
 #else
 # include <sys/time.h>
+# include <sysdep.h>
 
 int
 __gettimeofday (struct timeval *tv, struct timezone *tz)
 {
-  return ((int (*) (struct timeval *, struct timezone *)) 
VSYSCALL_ADDR_vgettimeofday) (tv, tz);
+  return INLINE_SYSCALL (gettimeofday, 2, tv, tz);
 }
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S 
b/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S
index 8ec7d3f..246c955 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S
+++ b/sysdeps/unix/sysv/linux/x86_64/sched_getcpu.S
@@ -20,6 +20,7 @@
 #include <tls.h>
 #define _ERRNO_H       1
 #include <bits/errno.h>
+#include <kernel-features.h>
 
 /* For the calculation see asm/vsyscall.h.  */
 #define VSYSCALL_ADDR_vgetcpu  0xffffffffff600800
@@ -38,10 +39,26 @@ ENTRY (sched_getcpu)
 #ifdef SHARED
        movq    __vdso_getcpu(%rip), %rax
        PTR_DEMANGLE (%rax)
+       callq   *%rax
 #else
+# ifdef __NR_getcpu
+       movl    $__NR_getcpu, %eax
+       syscall
+#  ifndef __ASSUME_GETCPU_SYSCALL
+       cmpq    $-ENOSYS, %rax
+       jne     1f
+#  endif
+# endif
+# ifndef __ASSUME_GETCPU_SYSCALL
        movq    $VSYSCALL_ADDR_vgetcpu, %rax
-#endif
        callq   *%rax
+1:
+# else
+#  ifndef __NR_getcpu
+#   error "cannot happen"
+#  endif
+# endif
+#endif
 
        cmpq    $-4095, %rax
        jae     SYSCALL_ERROR_LABEL
diff --git a/sysdeps/unix/sysv/linux/x86_64/time.c 
b/sysdeps/unix/sysv/linux/x86_64/time.c
index 698d561..c1c1a75 100644
--- a/sysdeps/unix/sysv/linux/x86_64/time.c
+++ b/sysdeps/unix/sysv/linux/x86_64/time.c
@@ -36,11 +36,13 @@ time_ifunc (void)
 __asm (".type time, %gnu_indirect_function");
 #else
 # include <time.h>
+# include <sysdep.h>
 
 time_t
 time (time_t *t)
 {
-  return ((time_t (*) (time_t *)) VSYSCALL_ADDR_vtime) (t);
+  INTERNAL_SYSCALL_DECL (err);
+  return INTERNAL_SYSCALL (time, err, 1, t);
 }
 #endif
 
2011-09-06  Andreas Jaeger  <a...@suse.de>

        * sysdeps/unix/sysv/linux/x86_64/gettimeofday.c: Include <errno.h>
        to fix build.

Index: glibc-2.14/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
===================================================================
--- glibc-2.14.orig/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
+++ glibc-2.14/sysdeps/unix/sysv/linux/x86_64/gettimeofday.c
@@ -36,6 +36,7 @@ gettimeofday_ifunc (void)
 }
 __asm (".type __gettimeofday, %gnu_indirect_function");
 #else
+# include <errno.h>
 # include <sys/time.h>
 # include <sysdep.h>
 
++++++ glibc-resolv-assert.diff ++++++
2011-07-21  Aurelien Jarno  <aure...@debian.org>

        * resolv/res_query.c(__libc_res_nquery): Assign hp and hp2 
        depending n and resplen2 to catch cases where answer 
        equals answerp2.

diff --git a/resolv/res_query.c b/resolv/res_query.c
index 2f7cfaa..405fa68 100644
--- a/resolv/res_query.c
+++ b/resolv/res_query.c
@@ -122,6 +122,7 @@ __libc_res_nquery(res_state statp,
                  int *resplen2)
 {
        HEADER *hp = (HEADER *) answer;
+       HEADER *hp2;
        int n, use_malloc = 0;
        u_int oflags = statp->_flags;
 
@@ -239,26 +240,25 @@ __libc_res_nquery(res_state statp,
          /* __libc_res_nsend might have reallocated the buffer.  */
          hp = (HEADER *) *answerp;
 
-       /* We simplify the following tests by assigning HP to HP2.  It
-          is easy to verify that this is the same as ignoring all
-          tests of HP2.  */
-       HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
-
-       if (n < (int) sizeof (HEADER) && answerp2 != NULL
-           && *resplen2 > (int) sizeof (HEADER))
+       /* We simplify the following tests by assigning HP to HP2 or
+          vice versa.  It is easy to verify that this is the same as
+          ignoring all tests of HP or HP2.  */
+       if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER))
          {
-           /* Special case of partial answer.  */
-           assert (hp != hp2);
-           hp = hp2;
+           hp2 = hp;
          }
-       else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
-                && n > (int) sizeof (HEADER))
+       else
          {
-           /* Special case of partial answer.  */
-           assert (hp != hp2);
-           hp2 = hp;
+           hp2 = (HEADER *) *answerp2;
+           if (n < (int) sizeof (HEADER))
+             {
+               hp = hp2;
+             }
          }
 
+       /* Make sure both hp and hp2 are defined */
+       assert((hp != NULL) && (hp2 != NULL));
+
        if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
            && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) {
 #ifdef DEBUG
++++++ x86-cpuid-level2.patch ++++++
openSUSE bug report:
https://bugzilla.novell.com/show_bug.cgi?id=681398

Patch from Debian, see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584748

---
 sysdeps/x86_64/cacheinfo.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- a/sysdeps/x86_64/cacheinfo.c
+++ b/sysdeps/x86_64/cacheinfo.c
@@ -254,7 +254,13 @@
 static long int __attribute__ ((noinline))
 handle_intel (int name, unsigned int maxidx)
 {
-  assert (maxidx >= 2);
+  if (maxidx <= 2)
+    {
+      /* This should never happen as all Intel i686 CPU support a CPUID
+        level of 2 minimum.  However valgrind sometimes load the i686
+        library with a P55C CPUID.  Return 0 in that case. */
+      return 0;
+    }
 
   /* OK, we can use the CPUID instruction to get all info about the
      caches.  */

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to