about summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-03-19 00:37:59 +0000
committerUlrich Drepper <drepper@redhat.com>2004-03-19 00:37:59 +0000
commit14c3586351fdf3e123b000f95a1e83314f78babb (patch)
treea88a6bfd8d809ab0b8e9ca70a2e63e932ddfa53d /sysdeps/generic
parent439ff07be06e9354151f984c7d0d2fb05917e8be (diff)
downloadglibc-14c3586351fdf3e123b000f95a1e83314f78babb.tar.gz
glibc-14c3586351fdf3e123b000f95a1e83314f78babb.tar.xz
glibc-14c3586351fdf3e123b000f95a1e83314f78babb.zip
Update.
2004-03-18  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/generic/dl-cache.c (_dl_load_cache_lookup): Remove hwcap
	variable and weak_extern for _dl_hwcap.
	(_DL_HWCAP_TLS_MASK): Define.
	(HWCAP_CHECK): Fix checking of non-platform hwcap bits.  Use
	lib->osversion instead of cache_new->libs[middle].osversion.

	* stdio-common/asprintf.c: Remove USE_IN_LIBIO conditionals.
	* stdio-common/dprintf.c: Likewise.
	* stdio-common/fprintf.c: Likewise.
	* stdio-common/getline.c: Likewise.
	* stdio-common/getw.c: Likewise.
	* stdio-common/perror.c: Likewise.
	* stdio-common/printf-prs.c: Likewise.
	* stdio-common/printf.c: Likewise.
	* stdio-common/printf_size.c: Likewise.
	* stdio-common/psignal.c: Likewise.
	* stdio-common/putw.c: Likewise.
	* stdio-common/scanf.c: Likewise.
	* stdio-common/snprintf.c: Likewise.
	* stdio-common/sprintf.c: Likewise.
	* stdio-common/sscanf.c: Likewise.
	* stdio-common/tstgetln.c: Likewise.
	* stdio-common/vfprintf.c: Likewise.

2004-03-18  Paul Eggert  <eggert@cs.ucla.edu>

	* posix/getopt.h (__GNUC_PREREQ) [!defined __THROW]: Define
	if not defined, fixing a typo (it used to be defined if
	__GNUC__ was not defined).
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/dl-cache.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/sysdeps/generic/dl-cache.c b/sysdeps/generic/dl-cache.c
index 2861dc2613..29886e194a 100644
--- a/sysdeps/generic/dl-cache.c
+++ b/sysdeps/generic/dl-cache.c
@@ -243,12 +243,7 @@ _dl_load_cache_lookup (const char *name)
 
   if (cache_new != (void *) -1)
     {
-      /* This file ends in static libraries where we don't have a hwcap.  */
-      unsigned long int *hwcap;
       uint64_t platform;
-#ifndef SHARED
-      weak_extern (_dl_hwcap);
-#endif
 
       /* This is where the strings start.  */
       cache_data = (const char *) cache_new;
@@ -256,22 +251,25 @@ _dl_load_cache_lookup (const char *name)
       /* Now we can compute how large the string table is.  */
       cache_data_size = (const char *) cache + cachesize - cache_data;
 
-      hwcap = &GLRO(dl_hwcap);
       platform = _dl_string_platform (GLRO(dl_platform));
       if (platform != (uint64_t) -1)
 	platform = 1ULL << platform;
 
       /* Only accept hwcap if it's for the right platform.  */
+#ifdef USE_TLS
+# define _DL_HWCAP_TLS_MASK (1LL << 63)
+#else
+# define _DL_HWCAP_TLS_MASK 0
+#endif
 #define HWCAP_CHECK \
-      if (GLRO(dl_osversion)						      \
-	  && cache_new->libs[middle].osversion > GLRO(dl_osversion))	      \
+      if (GLRO(dl_osversion) && lib->osversion > GLRO(dl_osversion))	      \
 	continue;							      \
       if (_DL_PLATFORMS_COUNT && platform != -1				      \
 	  && (lib->hwcap & _DL_HWCAP_PLATFORM) != 0			      \
 	  && (lib->hwcap & _DL_HWCAP_PLATFORM) != platform)		      \
 	continue;							      \
-      if (hwcap								      \
-	  && ((lib->hwcap & *hwcap & ~_DL_HWCAP_PLATFORM) > *hwcap))	      \
+      if (lib->hwcap							      \
+	  & ~(GLRO(dl_hwcap) | _DL_HWCAP_PLATFORM | _DL_HWCAP_TLS_MASK))      \
 	continue
       SEARCH_CACHE (cache_new);
     }