|
@@ -46,11 +46,11 @@ _dl_linux_resolver (struct elf_resolve *tpnt, int reloc_entry)
|
|
|
ElfW(Sym) *symtab;
|
|
|
int symtab_index;
|
|
|
char *rel_addr;
|
|
|
- struct elf_resolve *new_tpnt;
|
|
|
char *new_addr;
|
|
|
struct funcdesc_value funcval;
|
|
|
struct funcdesc_value volatile *got_entry;
|
|
|
char *symname;
|
|
|
+ struct symbol_ref sym_ref;
|
|
|
|
|
|
rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
|
|
|
|
|
@@ -59,15 +59,17 @@ _dl_linux_resolver (struct elf_resolve *tpnt, int reloc_entry)
|
|
|
|
|
|
symtab = (Elf32_Sym *) tpnt->dynamic_info[DT_SYMTAB];
|
|
|
strtab = (char *) tpnt->dynamic_info[DT_STRTAB];
|
|
|
+ sym_ref.sym = &symtab[symtab_index];
|
|
|
+ sym_ref.tpnt = NULL;
|
|
|
symname= strtab + symtab[symtab_index].st_name;
|
|
|
|
|
|
|
|
|
got_entry = (struct funcdesc_value *) DL_RELOC_ADDR(tpnt->loadaddr, this_reloc->r_offset);
|
|
|
|
|
|
|
|
|
- new_addr = _dl_lookup_hash(symname, tpnt->symbol_scope, NULL, 0, &new_tpnt);
|
|
|
+ new_addr = _dl_lookup_hash(symname, tpnt->symbol_scope, NULL, 0, &sym_ref);
|
|
|
if (!new_addr) {
|
|
|
- new_addr = _dl_lookup_hash(symname, NULL, NULL, 0, &new_tpnt);
|
|
|
+ new_addr = _dl_lookup_hash(symname, NULL, NULL, 0, &sym_ref);
|
|
|
if (!new_addr) {
|
|
|
_dl_dprintf(2, "%s: can't resolve symbol '%s'\n",
|
|
|
_dl_progname, symname);
|
|
@@ -76,7 +78,7 @@ _dl_linux_resolver (struct elf_resolve *tpnt, int reloc_entry)
|
|
|
}
|
|
|
|
|
|
funcval.entry_point = new_addr;
|
|
|
- funcval.got_value = new_tpnt->loadaddr.got_value;
|
|
|
+ funcval.got_value = sym_ref.tpnt->loadaddr.got_value;
|
|
|
|
|
|
#if defined (__SUPPORT_LD_DEBUG__)
|
|
|
if (_dl_debug_bindings) {
|
|
@@ -165,12 +167,15 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
|
|
|
#if defined (__SUPPORT_LD_DEBUG__)
|
|
|
unsigned long old_val;
|
|
|
#endif
|
|
|
+ struct symbol_ref sym_ref;
|
|
|
|
|
|
reloc_addr = (unsigned long *) DL_RELOC_ADDR(tpnt->loadaddr, rpnt->r_offset);
|
|
|
__asm__ ("" : "=r" (reloc_addr_packed) : "0" (reloc_addr));
|
|
|
reloc_type = ELF_R_TYPE(rpnt->r_info);
|
|
|
symtab_index = ELF_R_SYM(rpnt->r_info);
|
|
|
symbol_addr = 0;
|
|
|
+ sym_ref.sym = &symtab[symtab_index];
|
|
|
+ sym_ref.tpnt = NULL;
|
|
|
symname = strtab + symtab[symtab_index].st_name;
|
|
|
|
|
|
if (ELF_ST_BIND (symtab[symtab_index].st_info) == STB_LOCAL) {
|
|
@@ -179,7 +184,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
|
|
|
} else {
|
|
|
|
|
|
symbol_addr = (unsigned long)
|
|
|
- _dl_lookup_hash(symname, scope, NULL, 0, &symbol_tpnt);
|
|
|
+ _dl_lookup_hash(symname, scope, NULL, 0, &sym_ref);
|
|
|
|
|
|
|
|
|
* We want to allow undefined references to weak symbols - this might
|
|
@@ -189,9 +194,10 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
|
|
|
|
|
|
if (!symbol_addr && ELF_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK) {
|
|
|
_dl_dprintf (2, "%s: can't resolve symbol '%s'\n",
|
|
|
- _dl_progname, strtab + symtab[symtab_index].st_name);
|
|
|
+ _dl_progname, symname);
|
|
|
_dl_exit (1);
|
|
|
}
|
|
|
+ symbol_tpnt = sym_ref.tpnt;
|
|
|
}
|
|
|
|
|
|
#if defined (__SUPPORT_LD_DEBUG__)
|