diff options
Diffstat (limited to 'test/tls/tst-tls6.c')
| -rw-r--r-- | test/tls/tst-tls6.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/tls/tst-tls6.c b/test/tls/tst-tls6.c index 68d706538..2f58ea6ad 100644 --- a/test/tls/tst-tls6.c +++ b/test/tls/tst-tls6.c @@ -4,6 +4,10 @@ #include <link.h> #include <tls.h> +#ifdef __UCLIBC__ +#include "dl-elf.h" +#include "dl-hash.h" +#endif #define TEST_FUNCTION do_test () @@ -32,6 +36,19 @@ do_test (void) /* Dirty test code here: we peek into a private data structure. We make sure that the module gets assigned the same ID every time. The value of the first round is used. */ +#ifdef __UCLIBC__ + if (modid == -1) + modid = ((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid; + else if (((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid + != (size_t) modid) + { + printf ("round %d: modid now %zu, initially %d\n", + i, + ((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid, + modid); + result = 1; + } +#else if (modid == -1) modid = ((struct link_map *) h)->l_tls_modid; else if (((struct link_map *) h)->l_tls_modid != modid) @@ -40,6 +57,7 @@ do_test (void) i, ((struct link_map *) h)->l_tls_modid, modid); result = 1; } +#endif foop = dlsym (h, "foo"); if (foop == NULL) |
