tpnt->dynamic_addr = (ElfW(Dyn) *)dynamic_addr;
tpnt->libtype = loaded_file;
+#ifdef __DSBT__
+ if (dynamic_info[DT_DSBT_BASE_IDX] != 0)
+ tpnt->dsbt_table = (void *)dynamic_info[DT_DSBT_BASE_IDX];
+ if (dynamic_info[DT_DSBT_SIZE_IDX] != 0)
+ tpnt->dsbt_size = dynamic_info[DT_DSBT_SIZE_IDX];
+ if (dynamic_info[DT_DSBT_INDEX_IDX] != 0)
+ tpnt->dsbt_index = dynamic_info[DT_DSBT_INDEX_IDX];
+#endif /* __DSBT__ */
+
#ifdef __LDSO_GNU_HASH_SUPPORT__
if (dynamic_info[DT_GNU_HASH_IDX] != 0) {
Elf32_Word *hash32 = (Elf_Symndx*)dynamic_info[DT_GNU_HASH_IDX];
*/
return NULL;
#endif
+#ifdef ARCH_SKIP_RELOC
+ if (ARCH_SKIP_RELOC(type_class, sym))
+ return NULL;
+#endif
if (_dl_strcmp(strtab + sym->st_name, undef_name) != 0)
return NULL;
* This function resolves externals, and this is either called when we process
* relocations or when we call an entry in the PLT table for the first time.
*/
-char *_dl_lookup_hash(const char *name, struct r_scope_elem *scope, struct elf_resolve *mytpnt,
- struct sym_val *symbol, int type_class, struct elf_resolve **tpntp)
+char *_dl_find_hash(const char *name, struct r_scope_elem *scope, struct elf_resolve *mytpnt,
+ int type_class, struct symbol_ref *sym_ref)
{
struct elf_resolve *tpnt = NULL;
ElfW(Sym) *symtab;
unsigned long gnu_hash_number = _dl_gnu_hash((const unsigned char *)name);
#endif
+ if ((sym_ref) && (sym_ref->sym) && (ELF32_ST_VISIBILITY(sym_ref->sym->st_other) == STV_PROTECTED)) {
+ sym = sym_ref->sym;
+ if (mytpnt)
+ tpnt = mytpnt;
+ } else
for (loop_scope = scope; loop_scope && !sym; loop_scope = loop_scope->next) {
for (i = 0; i < loop_scope->r_nlist; i++) {
tpnt = loop_scope->r_list[i];
}
if (sym) {
- if (symbol) {
- symbol->s = sym;
- symbol->m = tpnt;
+ if (sym_ref) {
+ sym_ref->sym = sym;
+ sym_ref->tpnt = tpnt;
}
/* At this point we have found the requested symbol, do binding */
#if defined(USE_TLS) && USE_TLS
if (ELF_ST_TYPE(sym->st_info) == STT_TLS) {
- _dl_assert(tpntp != NULL);
- *tpntp = tpnt;
-
+ _dl_assert(sym_ref != NULL);
return (char *)sym->st_value;
}
#endif
#endif
case STB_GLOBAL:
#ifdef __FDPIC__
- if (tpntp)
- *tpntp = tpnt;
+ if (sym_ref)
+ sym_ref->tpnt = tpnt;
#endif
return (char *)DL_FIND_HASH_VALUE(tpnt, type_class, sym);
default: /* Local symbols not handled here */
}
}
#ifdef __FDPIC__
- if (tpntp)
- *tpntp = tpnt;
+ if (sym_ref)
+ sym_ref->tpnt = tpnt;
#endif
return weak_result;
}