Mailinglist Archive: opensuse-commit (1737 mails)

< Previous Next >
commit glibc for openSUSE:Factory
Hello community,

here is the log from the commit of package glibc for openSUSE:Factory checked
in at 2012-02-03 10:22:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/glibc (Old)
and /work/SRC/openSUSE:Factory/.glibc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "glibc", Maintainer is "matz@xxxxxxxx"

Changes:
--------
--- /work/SRC/openSUSE:Factory/glibc/glibc.changes 2012-01-19
10:34:44.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.glibc.new/glibc.changes 2012-02-03
10:22:41.000000000 +0100
@@ -1,0 +2,20 @@
+Tue Jan 31 13:20:37 UTC 2012 - aj@xxxxxxx
+
+- Fix checks for AVX (patch glibc-2.16-avx.patch)
+
+-------------------------------------------------------------------
+Tue Jan 31 09:44:07 UTC 2012 - aj@xxxxxxx
+
+- Use Linux 2.6.32 on x86_64 as oldest supported kernel
+
+-------------------------------------------------------------------
+Tue Jan 31 08:57:15 UTC 2012 - aj@xxxxxxx
+
+- Fix relocation ordering to fix ifunc crash (bnc#740109).
+
+-------------------------------------------------------------------
+Sun Jan 29 22:47:18 CET 2012 - dmueller@xxxxxxx
+
+- set abi back to gnueabi for ARM (regression from Jan 12)
+
+-------------------------------------------------------------------
@@ -47 +67,2 @@
- replace it by gb18030.patch.bz2 (synced with Fedora 16).
+ replace it by gb18030.patch.bz2 (synced with Fedora 16)
+ (bnc#743617).

Old:
----
glibc-2.15-math64crash.patch

New:
----
glibc-2.16-avx.patch
glibc-ifunc-2.16.patch

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

Other differences:
------------------
++++++ glibc.spec ++++++
--- /var/tmp/diff_new_pack.wWWNvY/_old 2012-02-03 10:22:53.000000000 +0100
+++ /var/tmp/diff_new_pack.wWWNvY/_new 2012-02-03 10:22:53.000000000 +0100
@@ -53,9 +53,14 @@
%define powerpc_optimize_cpu_power7 0
%define powerpc_optimize_cpu_cell 0
%endif # ppc, ppc64
+%ifarch x86_64
+# 2.6.32 is the SLES 11 SP1 kernel
+# 2.6.34 is the openSUSE 11.3 kernel
+%define enablekernel 2.6.32
+%else
# 2.6.16 is the SLES 10 kernel, use this as oldest supported kernel
-# since many SUSE build machines have it
%define enablekernel 2.6.16
+%endif
# ngpt was used in 8.1 and SLES8
Obsoletes: ngpt < 2.2.2
Obsoletes: ngpt-devel < 2.2.2
@@ -70,7 +75,7 @@
Obsoletes: glibc-32bit
%endif
Version: 2.15
-Release: 11
+Release: 0
%define git_id 2ba92745c36e
%define glibc_ports_ver 2.15
%define ports_git_id 8a70b2dcabbf
@@ -195,10 +200,12 @@
Patch89: glibc-2.16-scanf.patch
# PATCH-FIX-UPSTREAM Fix getcontext on 32-bit powerpc - aj@xxxxxxx
Patch90: glibc-ppc-getcontext.patch
-# PATCH-FIX-OPENSUSE Revert some math ifuncs (bnc#740109) - aj@xxxxxxx
-Patch91: glibc-2.15-math64crash.patch
+# PATCH-FIX-UPSTREAM Fix ifunc relocations (bnc#740109) - aj@xxxxxxx
+Patch91: glibc-ifunc-2.16.patch
# PATCH-FIX-OPENSUSE Remove netlink optimization (bnc#741021) - aj@xxxxxxx
Patch92: glibc-revert-netlink-cache.patch
+# PATCH-FIX-UPSTREAM Fix tests for AVX features - aj@xxxxxxx
+Patch93: glibc-2.16-avx.patch

%description
The GNU C Library provides the most important standard libraries used
@@ -433,6 +440,7 @@
%patch90 -p1
%patch91 -p1
%patch92 -p1 -R
+%patch93 -p1

#
# Inconsistency detected by ld.so: dl-close.c: 719: _dl_close: Assertion
`map->l_init_called' failed!
@@ -472,9 +480,13 @@
# We do not want configure to figure out the system its building one
# to support a common ground and thus set build and host to the
# target_cpu.
+%ifarch %arm
+%define target %{_target_cpu}-suse-linux-gnueabi
+%else
%define target %{_target_cpu}-suse-linux
+%endif
# Adjust glibc version.h
-echo "#define CONFHOST \"%{_target_cpu}-suse-linux\"" >> version.h
+echo "#define CONFHOST \"%{target}\"" >> version.h
echo "#define CVSDATE \"`date -r ChangeLog +%Y%m%d`\"" >> version.h
#
# Default CFLAGS and Compiler
@@ -536,9 +548,6 @@
# fails to build otherwise - need to recheck and fix
%define enable_stackguard_randomization 0
%endif
-# Remove completely, these give some strange crashes with dlopen
-# See bnc#740109
-rm -rf sysdeps/x86_64/fpu/multiarch

configure_and_build_glibc() {
local dirname="$1"; shift

++++++ check-build.sh ++++++
--- /var/tmp/diff_new_pack.wWWNvY/_old 2012-02-03 10:22:53.000000000 +0100
+++ /var/tmp/diff_new_pack.wWWNvY/_new 2012-02-03 10:22:53.000000000 +0100
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (c) 2003, 2004, 2011 SUSE Linux Products GmbH, Germany. All
rights reserved.
+# Copyright (c) 2003, 2004, 2011,2012 SUSE Linux Products GmbH, Germany. All
rights reserved.
#
# Authors: Thorsten Kukuk <kukuk@xxxxxxx>
#
@@ -13,12 +13,18 @@

# get kernel version
OFS="$IFS" ; IFS=".-" ; version=(`uname -r`) ; IFS="$OIFS"
+ARCH=(`uname -m`)

if test ${version[0]} -gt 2 ; then
: # okay
elif test ${version[0]} -lt 2 -o ${version[1]} -lt 6 -o ${version[2]} -lt 16 ;
then
echo "FATAL: kernel too old, need kernel >= 2.6.16 for this package"
1>&2
exit 1
+elif $ARCH -eq 'x86_64' ; then
+ if test ${version[0]} -lt 2 -o ${version[1]} -lt 6 -o ${version[2]}
-lt 32 ; then
+ echo "FATAL: kernel too old, need kernel >= 2.6.32 for this package"
1>&2
+ exit 1
+ fi
fi




++++++ glibc-2.16-avx.patch ++++++
++++ 846 lines (skipped)

++++++ glibc-ifunc-2.16.patch ++++++
commit 6ee65ed6ddbf04402fad0bec6aa9c73b9d982ae4
Author: Ulrich Drepper <drepper@xxxxxxxxx>
Date: Fri Jan 27 15:05:19 2012 -0500

Sort objects before relocations

2012-01-27 Ulrich Drepper <drepper@xxxxxxxxx>

[BZ #13618]
* elf/dl-open.c (dl_open_worker): Sort objects by dependency before
relocation.
* Makeconfig (libm): Define.
* elf/Makefile: Add rules to build and run tst-relsort1.
* elf/tst-relsort1.c: New file.
* elf/tst-relsort1mod1.c: New file.
* elf/tst-relsort1mod2.c: New file.

diff --git a/Makeconfig b/Makeconfig
index 8195245..185afbb 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -950,6 +950,12 @@ libdl =
endif
endif

+ifeq ($(build-shared),yes)
+libm = $(common-objpfx)math/libm.so$(libm.so-version)
+else
+libm = $(common-objpfx)math/libm.a
+endif
+
# These are the subdirectories containing the library source. The order
# is more or less arbitrary. The sorting step will take care of the
# dependencies.
diff --git a/elf/Makefile b/elf/Makefile
index 052e763..3f1772a 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -124,7 +124,8 @@ distribute := rtld-Rules \
tst-initordera1.c tst-initordera2.c tst-initorderb1.c \
tst-initorderb2.c tst-initordera3.c tst-initordera4.c \
tst-initorder.c \
- tst-initorder2.c
+ tst-initorder2.c \
+ tst-relsort1.c tst-relsort1mod1.c tst-relsort1mod2.c

CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables
@@ -227,7 +228,7 @@ tests += loadtest restest1 preloadtest loadfail multiload
origtest resolvfail \
tst-audit1 tst-audit2 \
tst-stackguard1 tst-addr1 tst-thrlock \
tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
- tst-initorder tst-initorder2
+ tst-initorder tst-initorder2 tst-relsort1
# reldep9
test-srcs = tst-pathopt
selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
@@ -290,7 +291,9 @@ modules-names = testobj1 testobj2 testobj3 testobj4
testobj5 testobj6 \
tst-initordera1 tst-initorderb1 \
tst-initordera2 tst-initorderb2 \
tst-initordera3 tst-initordera4 \
- tst-initorder2a tst-initorder2b tst-initorder2c tst-initorder2d
+ tst-initorder2a tst-initorder2b tst-initorder2c \
+ tst-initorder2d \
+ tst-relsort1mod1 tst-relsort1mod2
ifeq (yes,$(have-initfini-array))
modules-names += tst-array2dep tst-array5dep
endif
@@ -1195,3 +1198,9 @@ CFLAGS-tst-auditmod6b.c += $(AVX-CFLAGS)
CFLAGS-tst-auditmod6c.c += $(AVX-CFLAGS)
CFLAGS-tst-auditmod7b.c += $(AVX-CFLAGS)
endif
+
+$(objpfx)tst-relsort1: $(libdl)
+$(objpfx)tst-relsort1mod1.so: $(libm) $(objpfx)tst-relsort1mod2.so
+$(objpfx)tst-relsort1mod2.so: $(libm)
+$(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
+ $(objpfx)tst-relsort1mod2.so
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
@@ -1,5 +1,5 @@
/* Load a shared object at runtime, relocate it, and run its initializer.
- Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009, 2010, 2011, 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
@@ -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;

- _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
+ if (seen[i + 1] > 1)
+ {
+ ++i;
+ goto next_clear;
+ }

- if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
- {
- /* We must prepare the profiling. */
- _dl_start_profile ();
+ char this_seen = seen[i];
+ memmove (&seen[i], &seen[i + 1],
+ (k - i) * sizeof (seen[0]));
+ seen[k] = this_seen;

- /* Prevent unloading the object. */
- GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
- }
+ goto next;
+ }
+
+ --k;
}
- else
-#endif
- _dl_relocate_object (l, l->l_scope, reloc_mode, 0);
+
+ if (++i == nmaps)
+ break;
+ next_clear:
+ memset (&seen[i], 0, (nmaps - i) * sizeof (seen[0]));
+ next:;
}
+ }
+
+ for (size_t i = nmaps; i-- > 0; )
+ {
+ l = maps[i];
+
+#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 (l == new)
- break;
- l = l->l_prev;
+ 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 the file is not loaded now as a dependency, add the search
diff --git a/elf/tst-relsort1.c b/elf/tst-relsort1.c
new file mode 100644
index 0000000..972100c
--- /dev/null
+++ b/elf/tst-relsort1.c
@@ -0,0 +1,19 @@
+#include <dlfcn.h>
+#include <stdio.h>
+
+
+static int
+do_test ()
+{
+ const char lib[] = "$ORIGIN/tst-relsort1mod1.so";
+ void *h = dlopen (lib, RTLD_NOW);
+ if (h == NULL)
+ {
+ puts (dlerror ());
+ return 1;
+ }
+ return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/elf/tst-relsort1mod1.c b/elf/tst-relsort1mod1.c
new file mode 100644
index 0000000..9e4a943
--- /dev/null
+++ b/elf/tst-relsort1mod1.c
@@ -0,0 +1,7 @@
+extern int foo (double);
+
+int
+bar (void)
+{
+ return foo (1.2);
+}
diff --git a/elf/tst-relsort1mod2.c b/elf/tst-relsort1mod2.c
new file mode 100644
index 0000000..a2c3e55
--- /dev/null
+++ b/elf/tst-relsort1mod2.c
@@ -0,0 +1,7 @@
+#include <math.h>
+
+int
+foo (double d)
+{
+ return floor (d) != 0.0;
+}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages