From e6816a15ab7d7dbf3ffe75a9a22b4a37909aaf57 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Tue, 29 Mar 2005 13:47:21 +0000 Subject: Moved the addition of load address from the fast path where possible. This will also make ldso smaller. However the patch touches all archs and I have only tested PPC and x86. --- ldso/libdl/libdl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ldso/libdl/libdl.c') diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c index 012056a35..e538d89de 100644 --- a/ldso/libdl/libdl.c +++ b/ldso/libdl/libdl.c @@ -212,7 +212,7 @@ void *dlopen(const char *libname, int flag) if (dpnt->d_tag == DT_NEEDED) { char *name; - lpntstr = (char*) (tcurr->loadaddr + tcurr->dynamic_info[DT_STRTAB] + + lpntstr = (char*) (tcurr->dynamic_info[DT_STRTAB] + dpnt->d_un.d_val); name = _dl_get_last_path_component(lpntstr); tpnt1 = _dl_check_if_named_library_is_loaded(name, 0); @@ -640,8 +640,8 @@ int dladdr(const void *__address, Dl_info * __info) ElfW(Addr) sa; sa = 0; - symtab = (Elf32_Sym *) (pelf->dynamic_info[DT_SYMTAB] + pelf->loadaddr); - strtab = (char *) (pelf->dynamic_info[DT_STRTAB] + pelf->loadaddr); + symtab = (Elf32_Sym *) (pelf->dynamic_info[DT_SYMTAB]); + strtab = (char *) (pelf->dynamic_info[DT_STRTAB]); sf = 0; for (hn = 0; hn < pelf->nbucket; hn++) { -- cgit v1.2.3