diff options
Diffstat (limited to 'libexec/ld.so/powerpc/rtld_machine.c')
-rw-r--r-- | libexec/ld.so/powerpc/rtld_machine.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/libexec/ld.so/powerpc/rtld_machine.c b/libexec/ld.so/powerpc/rtld_machine.c index 9ea6e483bf9..4efb4154f92 100644 --- a/libexec/ld.so/powerpc/rtld_machine.c +++ b/libexec/ld.so/powerpc/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.13 2002/08/11 16:51:04 drahn Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.14 2002/08/23 22:57:03 drahn Exp $ */ /* * Copyright (c) 1999 Dale Rahn @@ -139,7 +139,7 @@ _dl_printf("object relocation size %x, numrela %x\n", Elf32_Addr ooff; const Elf32_Sym *sym, *this; const char *symn; - int inplt; + int type; if (ELF32_R_SYM(relas->r_info) == 0xffffff) continue; @@ -148,14 +148,18 @@ _dl_printf("object relocation size %x, numrela %x\n", sym += ELF32_R_SYM(relas->r_info); this = sym; symn = object->dyn.strtab + sym->st_name; + type = ELF32_R_TYPE(relas->r_info); ooff = 0; if (ELF32_R_SYM(relas->r_info) && !(ELF32_ST_BIND(sym->st_info) == STB_LOCAL && ELF32_ST_TYPE (sym->st_info) == STT_NOTYPE)) { - inplt = (ELF32_R_TYPE(relas->r_info) == RELOC_JMP_SLOT); - ooff = _dl_find_symbol(symn, _dl_objects, &this, 0, 0, inplt); + ooff = _dl_find_symbol(symn, _dl_objects, &this, + SYM_SEARCH_ALL|SYM_NOWARNNOTFOUND| + ((type == RELOC_JMP_SLOT) ? SYM_PLT:SYM_NOTPLT), + sym->st_size); + if (!this && ELF32_ST_BIND(sym->st_info) == STB_GLOBAL) { _dl_printf("%s: %s :can't resolve reference '%s'\n", _dl_progname, object->load_name, symn); @@ -163,7 +167,7 @@ _dl_printf("object relocation size %x, numrela %x\n", } } - switch (ELF32_R_TYPE(relas->r_info)) { + switch (type) { #if 1 case RELOC_32: if (ELF32_ST_BIND(sym->st_info) == STB_LOCAL && @@ -358,7 +362,11 @@ _dl_dcbf(r_addr); if (object != cobj) { /* only look in this object */ src_loff = _dl_find_symbol(symn, cobj, - &cpysrc, 1, 1, 0); + &cpysrc, + SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND| + ((type == RELOC_JMP_SLOT) ? + SYM_PLT : SYM_NOTPLT), + sym->st_size); } } if (cpysrc == NULL) { |