summaryrefslogtreecommitdiff
path: root/sysdeps/hppa/dl-lookupcfg.h
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@bell.net>2016-01-02 09:48:18 -0500
committerMike Frysinger <vapier@gentoo.org>2016-01-08 02:19:26 -0500
commit48025aa9ed3b9a5f5f3b1310eec79b66fb645c17 (patch)
treeca262547243148a546d8989f77b5180782374083 /sysdeps/hppa/dl-lookupcfg.h
parent6e76c11f89e9bd0b8bb7185dc754bf6c7dac572b (diff)
hppa: fix dladdr [BZ #19415]
The attached patch fixes dladdr on hppa. Instead of using the generic version of _dl_lookup_address, we use an implementation more or less modeled after __canonicalize_funcptr_for_compare() in gcc. The function pointer is analyzed and if it points to the trampoline used to call _dl_runtime_resolve just before the global offset table, then we call _dl_fixup to resolve the function pointer. Then, we return the instruction pointer from the first word of the descriptor. The change fixes the testcase provided in [BZ #19415] and the Debian nss package now builds successfully.
Diffstat (limited to 'sysdeps/hppa/dl-lookupcfg.h')
-rw-r--r--sysdeps/hppa/dl-lookupcfg.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h
index 998180c81d..3f1d14aa2f 100644
--- a/sysdeps/hppa/dl-lookupcfg.h
+++ b/sysdeps/hppa/dl-lookupcfg.h
@@ -31,9 +31,7 @@ rtld_hidden_proto (_dl_symbol_address)
Elf32_Addr _dl_lookup_address (const void *address);
-/* Clear the bottom two bits so generic code can find the fdesc entry */
-#define DL_LOOKUP_ADDRESS(addr) \
- (_dl_lookup_address ((void *)((unsigned long)addr & ~3)))
+#define DL_LOOKUP_ADDRESS(addr) _dl_lookup_address ((const void *) addr)
void attribute_hidden _dl_unmap (struct link_map *map);