Make old weak symbol handling work, if someone wants to
enable it.
unsigned long elf_hash_number, hn;
struct dyn_elf *rpnt;
const ElfW(Sym) *sym;
+ char *weak_result = NULL;
elf_hash_number = _dl_elf_hash(name);
#if 0
/* Perhaps we should support old style weak symbol handling
* per what glibc does when you export LD_DYNAMIC_WEAK */
- if(_dl_symbol((char *)name)) {
- if (!weak_result)
- weak_result = (char *)tpnt->loadaddr + sym->st_value;
- break;
- }
+ if (!weak_result)
+ weak_result = (char *)tpnt->loadaddr + sym->st_value;
+ break;
#endif
case STB_GLOBAL:
return (char*)tpnt->loadaddr + sym->st_value;
}
}
}
- return NULL;
+ return weak_result;
}