[PATCH] Fix hwcap handling in dl
GOTO Masanori
gotom@debian.or.jp
Sat Feb 1 21:29:00 GMT 2003
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);
}
More information about the Libc-alpha
mailing list