summaryrefslogtreecommitdiff
path: root/sysdeps/generic/dl-sysdep.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-20 08:49:27 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-20 08:49:27 +0000
commit676fde70c8940888bed31881ec9d0fd5c34f9dc0 (patch)
treebd680e1d2a7b269e51f1ffca66922ff4f2935bb4 /sysdeps/generic/dl-sysdep.c
parent057c823fbef95bf0ddb2a33c109b82488390ecec (diff)
Update.
2002-12-20 Ulrich Drepper <drepper@redhat.com> * sysdeps/generic/dl-sysdep.c (_dl_important_hwcaps): For TLS builds add "tls" in the search path. * elf/ldconfig.c (is_hwcap_platform): Also recognize "tls". (path_hwcap): Recognize "tls". * sysdeps/unix/sysv/linux/i386/system.c (cancel_handler): Use __waitpid instead of waitpid.
Diffstat (limited to 'sysdeps/generic/dl-sysdep.c')
-rw-r--r--sysdeps/generic/dl-sysdep.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c
index fbe5ad49e7..2a47a320da 100644
--- a/sysdeps/generic/dl-sysdep.c
+++ b/sysdeps/generic/dl-sysdep.c
@@ -37,6 +37,7 @@
#include <dl-procinfo.h>
#include <dl-osinfo.h>
#include <hp-timing.h>
+#include <tls.h>
extern char **_environ attribute_hidden;
extern void _end attribute_hidden;
@@ -291,17 +292,17 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
if ((masked & (1UL << n)) != 0)
++cnt;
+#ifdef USE_TLS
+ /* For TLS enabled builds always add 'tls'. */
+ ++cnt;
+#else
if (cnt == 0)
{
/* If we have platform name and no important capability we only have
the base directory to search. */
result = (struct r_strlenpair *) malloc (sizeof (*result));
if (result == NULL)
- {
- no_memory:
- INTUSE(_dl_signal_error) (ENOMEM, NULL, NULL,
- N_("cannot create capability list"));
- }
+ goto no_memory;
result[0].str = (char *) result; /* Does not really matter. */
result[0].len = 0;
@@ -309,6 +310,7 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
*sz = 1;
return result;
}
+#endif
/* Create temporary data structure to generate result table. */
temp = (struct r_strlenpair *) alloca (cnt * sizeof (*temp));
@@ -327,6 +329,11 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
temp[m].len = platform_len;
++m;
}
+#ifdef USE_TLS
+ temp[m].str = "tls";
+ temp[m].len = 3;
+ ++m;
+#endif
assert (m == cnt);
/* Determine the total size of all strings together. */
@@ -344,7 +351,11 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
*sz = 1 << cnt;
result = (struct r_strlenpair *) malloc (*sz * sizeof (*result) + total);
if (result == NULL)
- goto no_memory;
+ {
+ no_memory:
+ INTUSE(_dl_signal_error) (ENOMEM, NULL, NULL,
+ N_("cannot create capability list"));
+ }
if (cnt == 1)
{