This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] compile: Support relocation to GNU-IFUNCs
- From: Jan Kratochvil <jkratoch at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 6 May 2015 19:00:09 -0000
- Subject: [binutils-gdb] compile: Support relocation to GNU-IFUNCs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e26efa4066a5076f59427c927cc51c52b6b92f35
commit e26efa4066a5076f59427c927cc51c52b6b92f35
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Wed May 6 20:59:19 2015 +0200
compile: Support relocation to GNU-IFUNCs
Calling memcpy() could fail as memcpy() from libc is GNU-IFUNC.
gdb/ChangeLog
2015-05-06 Jan Kratochvil <jan.kratochvil@redhat.com>
* compile/compile-object-load.c (compile_object_load): Support
mst_text_gnu_ifunc.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/compile/compile-object-load.c | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4bfb619..9939658 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2015-05-06 Jan Kratochvil <jan.kratochvil@redhat.com>
+ * compile/compile-object-load.c (compile_object_load): Support
+ mst_text_gnu_ifunc.
+
+2015-05-06 Jan Kratochvil <jan.kratochvil@redhat.com>
+
* compile/compile.c (compile_to_object): Make the cmd_string parameter
const. Use new variables for the const compatibility.
(eval_compile_command): Make the cmd_string parameter const.
diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c
index 8a7f232..fe23448 100644
--- a/gdb/compile/compile-object-load.c
+++ b/gdb/compile/compile-object-load.c
@@ -554,6 +554,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\"."),