Skip to content

Commit

Permalink
Fix vDSO synthetic hwcap handling so they are not masked out from ld.…
Browse files Browse the repository at this point in the history
…so.cache matching.
  • Loading branch information
Roland McGrath committed Jul 21, 2010
1 parent d02dc4b commit 5dbc3b6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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-16 Ulrich Drepper <drepper@redhat.com>

* sysdeps/x86_64/multiarch/strstr.c: Rewrite to avoid indirect function
Expand Down
5 changes: 5 additions & 0 deletions elf/dl-sysdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,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)
{
Expand Down

0 comments on commit 5dbc3b6

Please sign in to comment.