diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2005-09-13 03:32:16 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2005-09-13 03:32:16 +0000 |
commit | fb6409e6536ea4b211831431853554849e0c52b3 (patch) | |
tree | f2946893aaca9aac9bd86ee2dde12cd3d59e59a0 /libexec | |
parent | fe391c3463bfcdedb699b4a98cd8b7c90ffeb2ec (diff) |
Only return a _dl_md_plabel() if the object is a function, do not indirect
a data reference. sigh.
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ld.so/dlfcn.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libexec/ld.so/dlfcn.c b/libexec/ld.so/dlfcn.c index 72c7400ffb8..0095023b1c1 100644 --- a/libexec/ld.so/dlfcn.c +++ b/libexec/ld.so/dlfcn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dlfcn.c,v 1.48 2005/05/23 19:22:11 drahn Exp $ */ +/* $OpenBSD: dlfcn.c,v 1.49 2005/09/13 03:32:15 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -181,8 +181,9 @@ dlsym(void *handle, const char *name) if (sym != NULL) { retval += sym->st_value; #ifdef __hppa__ - retval = (void *)_dl_md_plabel((Elf_Addr)retval, - object->dyn.pltgot); + if (ELF_ST_TYPE(sym->st_info) == STT_FUNC) + retval = (void *)_dl_md_plabel((Elf_Addr)retval, + object->dyn.pltgot); #endif DL_DEB(("dlsym: %s in %s: %p\n", name, object->load_name, retval)); |