This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[PATCH] Fix hwcap handling in dl
- From: GOTO Masanori <gotom at debian dot or dot jp>
- To: libc-alpha at sources dot redhat dot com
- Cc: gotom at debian dot or dot jp
- Date: Sun, 02 Feb 2003 06:29:50 +0900
- Subject: [PATCH] Fix hwcap handling in dl
Hi,
This patch fixes hwcap handling condition in dl.
Currently, hwcap check routine uses below code:
if (hwcap
&& ((lib->hwcap & *hwcap & ~_DL_HWCAP_PLATFORM) > *hwcap))
But this condition does not always fulfill, because left equation does
not exceed by right equation. My fix is if lib->hwcap has a value and
it does not match the current hwcap, then continue and use an another
library.
Please apply this patch.
Regards,
-- gotom
2002-02-02 GOTO Masanori <gotom@debian.or.jp>
* sysdeps/generic/dl-cache.c: Fix hwcap check condition.
--- sysdeps/generic/dl-cache.c 2003-02-02 05:33:47.000000000 +0900
+++ sysdeps/generic/dl-cache.c.new 2003-02-02 06:22:30.000000000 +0900
@@ -231,8 +231,8 @@
&& (lib->hwcap & _DL_HWCAP_PLATFORM) != 0 \
&& (lib->hwcap & _DL_HWCAP_PLATFORM) != platform) \
continue; \
- if (hwcap \
- && ((lib->hwcap & *hwcap & ~_DL_HWCAP_PLATFORM) > *hwcap)) \
+ if (hwcap && lib->hwcap != 0 \
+ && ((lib->hwcap & *hwcap & ~_DL_HWCAP_PLATFORM) == 0)) \
continue
SEARCH_CACHE (cache_new);
}