]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/uclibc/lib/contrib/uclibc/ldso/ldso/arm/elfinterp.c
update
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / ldso / ldso / arm / elfinterp.c
index adc282a57b57f99f2cd235065d742741e762207d..707b31743da5bb7492bc3f06db30a4efba44b18f 100644 (file)
@@ -189,6 +189,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
        unsigned long *reloc_addr;
        unsigned long symbol_addr;
        const Elf32_Sym *def = 0;
+       struct symbol_ref sym_ref;
        struct elf_resolve *def_mod = 0;
        int goof = 0;
 
@@ -197,12 +198,12 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
        reloc_type = ELF32_R_TYPE(rpnt->r_info);
        symtab_index = ELF32_R_SYM(rpnt->r_info);
        symbol_addr = 0;
+       sym_ref.sym = &symtab[symtab_index];
+       sym_ref.tpnt = NULL;
 
-       if (symtab_index &&
-                       (ELF32_ST_VISIBILITY(symtab[symtab_index].st_other)
-                        != STV_PROTECTED)) {
+       if (symtab_index) {
                symbol_addr = _dl_find_hash(strtab + symtab[symtab_index].st_name,
-                       scope, tpnt, elf_machine_type_class(reloc_type), &def_mod);
+                       scope, tpnt, elf_machine_type_class(reloc_type), &sym_ref);
 
                /*
                 * We want to allow undefined references to weak symbols - this might
@@ -215,18 +216,14 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
                        return 1;
 
                }
+               def_mod = sym_ref.tpnt;
        } else {
                /*
                 * Relocs against STN_UNDEF are usually treated as using a
                 * symbol value of zero, and using the module containing the
                 * reloc itself.
                 */
-               if (symtab_index)
-                       symbol_addr = DL_FIND_HASH_VALUE(tpnt, elf_machine_type_class(reloc_type),
-                                                                                       &symtab[symtab_index]);
-               else
-                       symbol_addr = symtab[symtab_index].st_value;
-
+               symbol_addr = symtab[symtab_index].st_value;
                def_mod = tpnt;
        }