about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2010-07-20 19:09:50 -0700
committerPetr Baudis <pasky@suse.cz>2010-11-09 01:44:35 +0100
commit62724d5f1e48077992e1655c2dc4b5c47c08090e (patch)
tree3e34317cb468fa14901bd59aa2f0199fc0fddb40
parent553fe7087a45cc8cb84a994ce85708d085788947 (diff)
downloadglibc-62724d5f1e48077992e1655c2dc4b5c47c08090e.tar.gz
glibc-62724d5f1e48077992e1655c2dc4b5c47c08090e.tar.xz
glibc-62724d5f1e48077992e1655c2dc4b5c47c08090e.zip
Fix vDSO synthetic hwcap handling so they are not masked out from ld.so.cache matching.
(cherry picked from commit 5dbc3b6cc0b759bf4b22d851ccb9cbf3e3cbc6ef)
-rw-r--r--ChangeLog7
-rw-r--r--elf/dl-sysdep.c5
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 3de08e9b8e..867aae4556 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-07-20  Roland McGrath  <roland@redhat.com>
+
+	* elf/dl-sysdep.c (_dl_important_hwcaps): Add dsocaps mask to
+	dl_hwcap_mask as well as dl_hwcap.  Without this, dsocaps matching in
+	ld.so.cache was broken.  With it, there is no way to disable dsocaps
+	like LD_HWCAP_MASK can disable hwcaps.
+
 2010-07-05  Roland McGrath  <roland@redhat.com>
 
 	* manual/arith.texi (Rounding Functions): Fix rint description
diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c
index 5700272f10..0f4970a786 100644
--- a/elf/dl-sysdep.c
+++ b/elf/dl-sysdep.c
@@ -424,6 +424,11 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
     {
       const ElfW(Word) mask = ((const ElfW(Word) *) dsocaps)[-1];
       GLRO(dl_hwcap) |= (uint64_t) mask << _DL_FIRST_EXTRA;
+      /* Note that we add the dsocaps to the set already chosen by the
+	 LD_HWCAP_MASK environment variable (or default HWCAP_IMPORTANT).
+	 So there is no way to request ignoring an OS-supplied dsocap
+	 string and bit like you can ignore an OS-supplied HWCAP bit.  */
+      GLRO(dl_hwcap_mask) |= (uint64_t) mask << _DL_FIRST_EXTRA;
       size_t len;
       for (const char *p = dsocaps; p < dsocaps + dsocapslen; p += len + 1)
 	{