Ver código fonte

Bradley D. LaRonde, brad at laronde dot org writes:

If I change that ELF_RTYPE_CLASS_COPY to ELF_RTYPE_CLASS_PLT to tell
_dl_find_hash to ignore stubs when resolving undefined functions without
stubs, the dlopen tests all pass.  dlopen gets a pointer to the libc.so
malloc instead of a pointer to the libpthread malloc stub.  Yay!  :-)
Eric Andersen 21 anos atrás
pai
commit
e2f4c03385
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      ldso/ldso/mips/elfinterp.c

+ 1 - 1
ldso/ldso/mips/elfinterp.c

@@ -285,7 +285,7 @@ void _dl_perform_mips_global_got_relocations(struct elf_resolve *tpnt)
 					*got_entry = sym->st_value + (unsigned long) tpnt->loadaddr;
 				else {
 					*got_entry = (unsigned long) _dl_find_hash(strtab +
-						sym->st_name, tpnt->symbol_scope, ELF_RTYPE_CLASS_COPY);
+						sym->st_name, tpnt->symbol_scope, ELF_RTYPE_CLASS_PLT);
 				}
 			}
 			else if (sym->st_shndx == SHN_COMMON) {