diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-09-19 01:29:11 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-09-19 01:29:11 +0000 |
commit | 996be4d2f17f10979c591575dcff12e502c4a87e (patch) | |
tree | f864d9d937a62efa6625a22601e9e9e067a6e82a /ldso/libdl | |
parent | 7f9010b2d3df3716c67fc00a0f1ec3c5fd127311 (diff) |
merge some more FDPIC related fixes from Bernd Schmidt
Diffstat (limited to 'ldso/libdl')
-rw-r--r-- | ldso/libdl/libdl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c index 79b181628..e7e33c426 100644 --- a/ldso/libdl/libdl.c +++ b/ldso/libdl/libdl.c @@ -378,10 +378,10 @@ void *dlopen(const char *libname, int flag) if (tpnt->dynamic_info[DT_INIT]) { void (*dl_elf_func) (void); dl_elf_func = (void (*)(void)) DL_RELOC_ADDR(tpnt->loadaddr, tpnt->dynamic_info[DT_INIT]); - if (dl_elf_func && *dl_elf_func != NULL) { + if (dl_elf_func) { _dl_if_debug_print("running ctors for library %s at '%p'\n", tpnt->libname, dl_elf_func); - (*dl_elf_func) (); + DL_CALL_FUNC_AT_ADDR (dl_elf_func, tpnt->loadaddr, (void(*)(void))); } } @@ -513,7 +513,7 @@ static int do_dlclose(void *vhandle, int need_fini) dl_elf_fini = (int (*)(void)) DL_RELOC_ADDR(tpnt->loadaddr, tpnt->dynamic_info[DT_FINI]); _dl_if_debug_print("running dtors for library %s at '%p'\n", tpnt->libname, dl_elf_fini); - (*dl_elf_fini) (); + DL_CALL_FUNC_AT_ADDR (dl_elf_fini, tpnt->loadaddr, (int (*)(void))); } } @@ -660,7 +660,7 @@ int dladdr(const void *__address, Dl_info * __info) _dl_if_debug_print("Module \"%s\" at %p\n", tpnt->libname, DL_LOADADDR_BASE(tpnt->loadaddr)); - if (DL_ADDR_IN_LOADADDR((ElfW(Addr)) __address, tpnt, pelf)) + if (DL_ADDR_IN_LOADADDR((ElfW(Addr)) __address, tpnt, pelf)) pelf = tpnt; } |