OSDN Git Service

Bradley D. LaRonde, brad at laronde dot org writes:
authorEric Andersen <andersen@codepoet.org>
Tue, 11 May 2004 07:21:47 +0000 (07:21 -0000)
committerEric Andersen <andersen@codepoet.org>
Tue, 11 May 2004 07:21:47 +0000 (07:21 -0000)
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!  :-)

ldso/ldso/mips/elfinterp.c

index 5be0421..3cdf9d8 100644 (file)
@@ -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) {