diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2003-09-04 19:33:51 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2003-09-04 19:33:51 +0000 |
commit | 29153d4f5d5ce3630a02cc3cf4cf730b0a5ead11 (patch) | |
tree | 2a1d053c01a48b7525f6a6f8419e05bd86dff69d /libexec/ld.so/alpha/rtld_machine.c | |
parent | 60dd990bce1a4f0ccb85ad7cb0957d7c47a202ef (diff) |
Symbol cache for GOT lookup. When a symbol is found it is saved in a cache
for future lookups in the same GOT relocation table. Uses static buffer
for small symbol tables, mmap for larger ones. ok deraadt@
Diffstat (limited to 'libexec/ld.so/alpha/rtld_machine.c')
-rw-r--r-- | libexec/ld.so/alpha/rtld_machine.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libexec/ld.so/alpha/rtld_machine.c b/libexec/ld.so/alpha/rtld_machine.c index 8a2c61b9230..5dfd9864f13 100644 --- a/libexec/ld.so/alpha/rtld_machine.c +++ b/libexec/ld.so/alpha/rtld_machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtld_machine.c,v 1.26 2003/09/02 15:17:51 drahn Exp $ */ +/* $OpenBSD: rtld_machine.c,v 1.27 2003/09/04 19:33:49 drahn Exp $ */ /* * Copyright (c) 1999 Dale Rahn @@ -107,9 +107,10 @@ _dl_md_reloc(elf_object_t *object, int rel, int relasz) this = NULL; switch (ELF64_R_TYPE(relas->r_info)) { case R_TYPE(REFQUAD): - ooff = _dl_find_symbol(symn, _dl_objects, &this, + ooff = _dl_find_symbol_bysym(object, + ELF64_R_SYM(relas->r_info), _dl_objects, &this, SYM_SEARCH_ALL|SYM_WARNNOTFOUND|SYM_NOTPLT, - sym->st_size, object); + sym->st_size); if (this == NULL) goto resolve_failed; *r_addr += ooff + this->st_value + relas->r_addend; @@ -140,9 +141,10 @@ _dl_printf("unaligned RELATIVE: %p type: %d %s 0x%lx -> 0x%lx\n", r_addr, *r_addr = ooff + this->st_value + relas->r_addend; break; case R_TYPE(GLOB_DAT): - ooff = _dl_find_symbol(symn, _dl_objects, &this, + ooff = _dl_find_symbol_bysym(object, + ELF64_R_SYM(relas->r_info), _dl_objects, &this, SYM_SEARCH_ALL|SYM_WARNNOTFOUND|SYM_NOTPLT, - sym->st_size, object); + sym->st_size); if (this == NULL) goto resolve_failed; *r_addr = ooff + this->st_value + relas->r_addend; |