diff options
-rw-r--r-- | libexec/rtld-elf/rtld.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 828b8b4..d3ce3c6 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2618,7 +2618,9 @@ do_dlsym(void *handle, const char *name, void *retaddr, const Ver_Entry *ve, const Elf_Sym *def; SymLook req; RtldLockState lockstate; +#ifndef __ia64__ tls_index ti; +#endif int res; def = NULL; @@ -2734,9 +2736,13 @@ do_dlsym(void *handle, const char *name, void *retaddr, const Ver_Entry *ve, else if (ELF_ST_TYPE(def->st_info) == STT_GNU_IFUNC) return (rtld_resolve_ifunc(defobj, def)); else if (ELF_ST_TYPE(def->st_info) == STT_TLS) { +#ifdef __ia64__ + return (__tls_get_addr(defobj->tlsindex, def->st_value)); +#else ti.ti_module = defobj->tlsindex; ti.ti_offset = def->st_value; return (__tls_get_addr(&ti)); +#endif } else return (defobj->relocbase + def->st_value); } |