Author: aurel32
Date: 2012-01-30 21:59:33 +0000 (Mon, 30 Jan 2012)
New Revision: 5143

Added:
   glibc-package/trunk/debian/patches/amd64/cvs-avx-osxsave.diff
   glibc-package/trunk/debian/patches/any/cvs-fmtmsg-lock.diff
   glibc-package/trunk/debian/patches/any/cvs-reloc-sort.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/control
   glibc-package/trunk/debian/control.in/main
   glibc-package/trunk/debian/debhelper.in/libc.NEWS
   glibc-package/trunk/debian/patches/series
Log:
Upload to unstable



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2012-01-28 23:30:07 UTC (rev 
5142)
+++ glibc-package/trunk/debian/changelog        2012-01-30 21:59:33 UTC (rev 
5143)
@@ -1,4 +1,4 @@
-eglibc (2.13-25) UNRELEASED; urgency=medium
+eglibc (2.13-25) unstable; urgency=medium
 
   [ Aurelien Jarno ]
   * patches/s390/cvs-libm-ulps.diff: new patch to fix FTBFS on s390 with
@@ -21,6 +21,12 @@
     (>= 3.2.1-1) to get accept4 defined on ia64. 
     debian/libc6.1.symbols.ia64: force accept4 version to 2.13-25~.
   * debian/control.in/main: use architecture aliases in build-depends.
+  * patches/amd64/cvs-avx-osxsave.diff: new patch from upstream to disable
+    AVX support if the kernel doesn't support it.
+  * patches/any/cvs-fmtmsg-lock.diff: new patch from upstream to fix a 
+    locking issue in fmtmsg.
+  * patches/any/cvs-reloc-sort.diff: new patch from upstream to fix 
+    relocation issues with dlopen().
 
   [ Samuel Thibault ]
   * patches/hurd-i386/submitted-mmap.diff: New patch to fix iceweasel hang.
@@ -32,7 +38,7 @@
     Closes: #630203, #654712.
   * fixup kfreebsd/local-use-thr-primitives.diff. Closes: #657687.
 
- -- Samuel Thibault <[email protected]>  Tue, 27 Dec 2011 02:02:41 +0100
+ -- Aurelien Jarno <[email protected]>  Sun, 29 Jan 2012 23:35:12 +0100
 
 eglibc (2.13-24) unstable; urgency=low
 

Modified: glibc-package/trunk/debian/control
===================================================================
--- glibc-package/trunk/debian/control  2012-01-28 23:30:07 UTC (rev 5142)
+++ glibc-package/trunk/debian/control  2012-01-30 21:59:33 UTC (rev 5143)
@@ -3,7 +3,7 @@
 Priority: required
 Build-Depends: gettext, make (>= 3.80), dpkg-dev (>= 1.16.0), bzip2, xz-utils, 
file, quilt,
  autoconf, sed (>= 4.0.5-4), gawk, debhelper (>= 7.4.3), tar (>= 1.22), fdupes,
- linux-libc-dev (>= 3.2.1-1) [linux-any],
+ linux-libc-dev (>= 3.2.1) [linux-any],
  mig (>= 1.3-2) [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386], gnumach-dev 
[hurd-i386], libpthread-stubs0-dev [hurd-i386],
  kfreebsd-kernel-headers [kfreebsd-any],
  binutils (>= 2.20-3), binutils (>= 2.21) [sparc sparc64],

Modified: glibc-package/trunk/debian/control.in/main
===================================================================
--- glibc-package/trunk/debian/control.in/main  2012-01-28 23:30:07 UTC (rev 
5142)
+++ glibc-package/trunk/debian/control.in/main  2012-01-30 21:59:33 UTC (rev 
5143)
@@ -3,7 +3,7 @@
 Priority: required
 Build-Depends: gettext, make (>= 3.80), dpkg-dev (>= 1.16.0), bzip2, xz-utils, 
file, quilt,
  autoconf, sed (>= 4.0.5-4), gawk, debhelper (>= 7.4.3), tar (>= 1.22), fdupes,
- linux-libc-dev (>= 3.2.1-1) [linux-any],
+ linux-libc-dev (>= 3.2.1) [linux-any],
  mig (>= 1.3-2) [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386], gnumach-dev 
[hurd-i386], libpthread-stubs0-dev [hurd-i386],
  kfreebsd-kernel-headers [kfreebsd-any],
  binutils (>= 2.20-3), binutils (>= 2.21) [sparc sparc64],

Modified: glibc-package/trunk/debian/debhelper.in/libc.NEWS
===================================================================
--- glibc-package/trunk/debian/debhelper.in/libc.NEWS   2012-01-28 23:30:07 UTC 
(rev 5142)
+++ glibc-package/trunk/debian/debhelper.in/libc.NEWS   2012-01-30 21:59:33 UTC 
(rev 5143)
@@ -1,4 +1,4 @@
-eglibc (2.13-25) unstable; urgency=low
+eglibc (2.13-25) unstable; urgency=medium
 
   Starting with the eglibc package version 2.13-5, the libraries are 
   shipped in the multiarch directory /lib/<triplet> instead of the more

Added: glibc-package/trunk/debian/patches/amd64/cvs-avx-osxsave.diff
===================================================================
--- glibc-package/trunk/debian/patches/amd64/cvs-avx-osxsave.diff               
                (rev 0)
+++ glibc-package/trunk/debian/patches/amd64/cvs-avx-osxsave.diff       
2012-01-30 21:59:33 UTC (rev 5143)
@@ -0,0 +1,43 @@
+2012-01-26  Ulrich Drepper  <[email protected]>
+
+       [BZ #13583]
+       * sysdeps/x86_64/multiarch/init-arch.h: Define bit_OSXSAVE.
+       * sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features): If
+       bit_AVX is set also check OSXAVE/XCR0 and reset bit_AVX if necessary.
+
+diff --git a/sysdeps/x86_64/multiarch/init-arch.c 
b/sysdeps/x86_64/multiarch/init-arch.c
+index 65b0ee9..4fabbee 100644
+--- a/sysdeps/x86_64/multiarch/init-arch.c
++++ b/sysdeps/x86_64/multiarch/init-arch.c
+@@ -144,6 +144,18 @@ __init_cpu_features (void)
+   else
+     kind = arch_kind_other;
+ 
++  if (__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx & bit_AVX)
++    {
++      /* Reset the AVX bit in case OSXSAVE is disabled.  */
++      if ((__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx & bit_OSXSAVE) == 0
++        || ({ unsigned int xcrlow;
++            unsigned int xcrhigh;
++            asm ("xgetbv"
++                 : "=a" (xcrlow), "=d" (xcrhigh) : "c" (0));
++            (xcrlow & 6) != 6; }))
++      __cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx &= ~bit_AVX;
++    }
++
+   __cpu_features.family = family;
+   __cpu_features.model = model;
+   atomic_write_barrier ();
+diff --git a/sysdeps/x86_64/multiarch/init-arch.h 
b/sysdeps/x86_64/multiarch/init-arch.h
+index 2a1df39..408e5ae 100644
+--- a/sysdeps/x86_64/multiarch/init-arch.h
++++ b/sysdeps/x86_64/multiarch/init-arch.h
+@@ -29,6 +29,8 @@
+ # define bit_SSSE3    (1 << 9)
+ # define bit_SSE4_1   (1 << 19)
+ # define bit_SSE4_2   (1 << 20)
++# define bit_OSXSAVE  (1 << 27)
++# define bit_AVX      (1 << 28)
+ 
+ # define index_SSE2   COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_EDX_OFFSET
+ # define index_SSSE3  COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET

Added: glibc-package/trunk/debian/patches/any/cvs-fmtmsg-lock.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/cvs-fmtmsg-lock.diff                 
        (rev 0)
+++ glibc-package/trunk/debian/patches/any/cvs-fmtmsg-lock.diff 2012-01-30 
21:59:33 UTC (rev 5143)
@@ -0,0 +1,17 @@
+2012-01-16  Ulrich Drepper  <[email protected]>
+
+       * stdlib/fmtmsg.c (init): Add missing unlock.
+       Patch by Peng Haitao <[email protected]>.
+
+
+--- a/stdlib/fmtmsg.c
++++ b/stdlib/fmtmsg.c
+@@ -280,6 +281,8 @@ init (void)
+ 
+         sevlevel_var = end + (*end == ':' ? 1 : 0);
+       }
++
++      __libc_lock_unlock (lock);
+     }
+ }
+ 

Added: glibc-package/trunk/debian/patches/any/cvs-reloc-sort.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/cvs-reloc-sort.diff                  
        (rev 0)
+++ glibc-package/trunk/debian/patches/any/cvs-reloc-sort.diff  2012-01-30 
21:59:33 UTC (rev 5143)
@@ -0,0 +1,149 @@
+2012-01-27  Ulrich Drepper  <[email protected]>
+
+       [BZ #13618]
+       * elf/dl-open.c (dl_open_worker): Sort objects by dependency before
+       relocation.
+
+diff --git a/elf/dl-open.c b/elf/dl-open.c
+index a0b5c50..a56bdc1 100644
+--- a/elf/dl-open.c
++++ b/elf/dl-open.c
+@@ -302,45 +302,109 @@ dl_open_worker (void *a)
+   if (GLRO(dl_lazy))
+     reloc_mode |= mode & RTLD_LAZY;
+ 
+-  /* Relocate the objects loaded.  We do this in reverse order so that copy
+-     relocs of earlier objects overwrite the data written by later objects.  
*/
+-
++  /* Sort the objects by dependency for the relocation process.  This
++     allows IFUNC relocations to work and it also means copy
++     relocation of dependencies are if necessary overwritten.  */
++  size_t nmaps = 0;
+   struct link_map *l = new;
+-  while (l->l_next)
+-    l = l->l_next;
+-  while (1)
++  do
++    {
++      if (! l->l_real->l_relocated)
++      ++nmaps;
++      l = l->l_next;
++    }
++  while (l != NULL);
++  struct link_map *maps[nmaps];
++  nmaps = 0;
++  l = new;
++  do
+     {
+       if (! l->l_real->l_relocated)
++      maps[nmaps++] = l;
++      l = l->l_next;
++    }
++  while (l != NULL);
++  if (nmaps > 1)
++    {
++      char seen[nmaps];
++      memset (seen, '\0', nmaps);
++      size_t i = 0;
++      while (1)
+       {
+-#ifdef SHARED
+-        if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
++        ++seen[i];
++        struct link_map *thisp = maps[i];
++
++        /* Find the last object in the list for which the current one is
++           a dependency and move the current object behind the object
++           with the dependency.  */
++        size_t k = nmaps - 1;
++        while (k > i)
+           {
+-            /* If this here is the shared object which we want to profile
+-               make sure the profile is started.  We can find out whether
+-               this is necessary or not by observing the `_dl_profile_map'
+-               variable.  If was NULL but is not NULL afterwars we must
+-               start the profiling.  */
+-            struct link_map *old_profile_map = GL(dl_profile_map);
++            struct link_map **runp = maps[k]->l_initfini;
++            if (runp != NULL)
++              /* Look through the dependencies of the object.  */
++              while (*runp != NULL)
++                if (__builtin_expect (*runp++ == thisp, 0))
++                  {
++                    /* Move the current object to the back past the last
++                       object with it as the dependency.  */
++                    memmove (&maps[i], &maps[i + 1],
++                             (k - i) * sizeof (maps[0]));
++                    maps[k] = thisp;
++
++                    if (seen[i + 1] > 1)
++                      {
++                        ++i;
++                        goto next_clear;
++                      }
++
++                    char this_seen = seen[i];
++                    memmove (&seen[i], &seen[i + 1],
++                             (k - i) * sizeof (seen[0]));
++                    seen[k] = this_seen;
++
++                    goto next;
++                  }
++
++            --k;
++          }
+ 
+-            _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
++        if (++i == nmaps)
++          break;
++      next_clear:
++        memset (&seen[i], 0, (nmaps - i) * sizeof (seen[0]));
++      next:;
++      }
++    }
+ 
+-            if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
+-              {
+-                /* We must prepare the profiling.  */
+-                _dl_start_profile ();
++  for (size_t i = nmaps; i-- > 0; )
++    {
++      l = maps[i];
+ 
+-                /* Prevent unloading the object.  */
+-                GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
+-              }
++#ifdef SHARED
++      if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
++      {
++        /* If this here is the shared object which we want to profile
++           make sure the profile is started.  We can find out whether
++           this is necessary or not by observing the `_dl_profile_map'
++           variable.  If it was NULL but is not NULL afterwars we must
++           start the profiling.  */
++        struct link_map *old_profile_map = GL(dl_profile_map);
++
++        _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
++
++        if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
++          {
++            /* We must prepare the profiling.  */
++            _dl_start_profile ();
++
++            /* Prevent unloading the object.  */
++            GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
+           }
+-        else
+-#endif
+-          _dl_relocate_object (l, l->l_scope, reloc_mode, 0);
+       }
+-
+-      if (l == new)
+-      break;
+-      l = l->l_prev;
++      else
++#endif
++      _dl_relocate_object (l, l->l_scope, reloc_mode, 0);
+     }
+ 
+   /* If the file is not loaded now as a dependency, add the search

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series   2012-01-28 23:30:07 UTC (rev 
5142)
+++ glibc-package/trunk/debian/patches/series   2012-01-30 21:59:33 UTC (rev 
5143)
@@ -77,6 +77,7 @@
 amd64/cvs-pthread-stack-alignment.diff
 amd64/cvs-avx-detection.diff
 amd64/cvs-dl_trampoline-cfi.diff
+amd64/cvs-avx-osxsave.diff
 
 arm/local-atomic.diff
 arm/local-eabi-wchar.diff
@@ -317,3 +318,5 @@
 any/local-linuxthreads-XPG7.diff
 any/cvs-tzfile.diff
 any/cvs-vfscanf.diff
+any/cvs-fmtmsg-lock.diff
+any/cvs-reloc-sort.diff


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to