]> sourceware.org Git - glibc.git/commit
elf: Fix glibc-hwcaps priorities with cache flags mismatches [BZ #27046]
authorFlorian Weimer <fweimer@redhat.com>
Fri, 25 Jun 2021 06:02:30 +0000 (08:02 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 25 Jun 2021 06:02:33 +0000 (08:02 +0200)
commit66db95b6e8264c5a6307f6a9e5285fec76907254
tree4cb31ede664f53a72cb761ecb1755d1ac1b5444b
parentac3babc3944ee6b37bcd0dabaa0b778fb942d4aa
elf: Fix glibc-hwcaps priorities with cache flags mismatches [BZ #27046]

If lib->flags (in the cache) did not match GLRO (dl_correct_cache_id),
searching for further glibc-hwcaps entries did not happen, and it
was possible that the best glibc-hwcaps was not found.  By accident,
this causes a test failure for elf/tst-glibc-hwcaps-prepend-cache
on armv7l.

This commit changes the cache lookup logic to continue searching
if (a) no match has been found, (b) a named glibc-hwcaps match
has been found(), or (c) non-glibc-hwcaps match has been found
and the entry flags and cache default flags do not match.

_DL_CACHE_DEFAULT_ID is used instead of GLRO (dl_correct_cache_id)
because the latter is only written once on i386 if loading
of libc.so.5 libraries is selected, so GLRO (dl_correct_cache_id)
should probably removed in a future change.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
elf/dl-cache.c
This page took 0.040816 seconds and 5 git commands to generate.