Fix ia64 build after r233655.

MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2012-03-29 17:50:01 +00:00
parent 03e9308f0a
commit 5b7a7b02b8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=233674

View File

@ -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);
}