This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH v4 05/11] compile: Support relocation to GNU-IFUNCs
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Phil Muldoon <pmuldoon at redhat dot com>
- Date: Sun, 03 May 2015 16:07:27 +0200
- Subject: [PATCH v4 05/11] compile: Support relocation to GNU-IFUNCs
- Authentication-results: sourceware.org; auth=none
- References: <20150503140647 dot 18583 dot 2012 dot stgit at host1 dot jankratochvil dot net>
The 'compile print' part disclosed that calling memcpy() may fail as memcpy()
from libc is GNU-IFUNC.
gdb/ChangeLog
2015-04-06 Jan Kratochvil <jan.kratochvil@redhat.com>
* compile/compile-object-load.c (compile_object_load): Support
mst_text_gnu_ifunc.
---
gdb/compile/compile-object-load.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c
index dbd5ec0..fd440be 100644
--- a/gdb/compile/compile-object-load.c
+++ b/gdb/compile/compile-object-load.c
@@ -555,6 +555,10 @@ compile_object_load (const char *object_file, const char *source_file,
case mst_text:
sym->value = BMSYMBOL_VALUE_ADDRESS (bmsym);
break;
+ case mst_text_gnu_ifunc:
+ sym->value = gnu_ifunc_resolve_addr (target_gdbarch (),
+ BMSYMBOL_VALUE_ADDRESS (bmsym));
+ break;
default:
warning (_("Could not find symbol \"%s\" "
"for compiled module \"%s\"."),