diff options
Diffstat (limited to 'libexec/ld.so/amd64/rtld_machine.c')
-rw-r--r-- | libexec/ld.so/amd64/rtld_machine.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/libexec/ld.so/amd64/rtld_machine.c b/libexec/ld.so/amd64/rtld_machine.c index d482f52c300..2dd82c91183 100644 --- a/libexec/ld.so/amd64/rtld_machine.c +++ b/libexec/ld.so/amd64/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.7 2004/05/25 21:42:47 mickey Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.8 2005/09/16 23:19:41 drahn Exp $ */ /* * Copyright (c) 2002,2004 Dale Rahn @@ -234,11 +234,11 @@ _dl_md_reloc(elf_object_t *object, int rel, int relsz) } else { this = NULL; ooff = _dl_find_symbol_bysym(object, - ELF_R_SYM(rels->r_info), _dl_objects, - &this,NULL,SYM_SEARCH_ALL|SYM_WARNNOTFOUND| + ELF_R_SYM(rels->r_info), &this, + SYM_SEARCH_ALL|SYM_WARNNOTFOUND| ((type == R_TYPE(JUMP_SLOT))? SYM_PLT:SYM_NOTPLT), - sym->st_size); + sym->st_size, NULL); if (this == NULL) { resolve_failed: _dl_printf("%s: %s: can't resolve " @@ -264,10 +264,10 @@ resolve_failed: size_t size = dstsym->st_size; Elf_Addr soff; - soff = _dl_find_symbol(symn, object->next, &srcsym, - NULL, SYM_SEARCH_ALL|SYM_WARNNOTFOUND| + soff = _dl_find_symbol(symn, &srcsym, + SYM_SEARCH_OTHER|SYM_WARNNOTFOUND| ((type == R_TYPE(JUMP_SLOT)) ? SYM_PLT:SYM_NOTPLT), - size, object); + size, object, NULL); if (srcsym == NULL) goto resolve_failed; @@ -353,8 +353,9 @@ _dl_bind(elf_object_t *object, int index) addr = (Elf_Word *)(object->load_offs + rel->r_offset); this = NULL; - ooff = _dl_find_symbol(symn, _dl_objects, &this, NULL, - SYM_SEARCH_ALL|SYM_WARNNOTFOUND|SYM_PLT, sym->st_size, object); + ooff = _dl_find_symbol(symn, &this, + SYM_SEARCH_ALL|SYM_WARNNOTFOUND|SYM_PLT, sym->st_size, + object, NULL); if (this == NULL) { _dl_printf("lazy binding failed!\n"); *((int *)0) = 0; /* XXX */ @@ -404,14 +405,14 @@ _dl_md_reloc_got(elf_object_t *object, int lazy) object->got_addr = NULL; object->got_size = 0; this = NULL; - ooff = _dl_find_symbol("__got_start", object, &this, NULL, - SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, object); + ooff = _dl_find_symbol("__got_start", &this, + SYM_SEARCH_OBJ|SYM_NOWARNNOTFOUND|SYM_PLT, 0, object, NULL); if (this != NULL) object->got_addr = ooff + this->st_value; this = NULL; - ooff = _dl_find_symbol("__got_end", object, &this, NULL, - SYM_SEARCH_SELF|SYM_NOWARNNOTFOUND|SYM_PLT, 0, object); + ooff = _dl_find_symbol("__got_end", &this, + SYM_SEARCH_OBJ|SYM_NOWARNNOTFOUND|SYM_PLT, 0, object, NULL); if (this != NULL) object->got_size = ooff + this->st_value - object->got_addr; |