From: Jan Kratochvil Date: Wed, 6 May 2015 18:59:19 +0000 (+0200) Subject: compile: Support relocation to GNU-IFUNCs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e26efa4066a5076f59427c927cc51c52b6b92f35;p=binutils-gdb.git compile: Support relocation to GNU-IFUNCs Calling memcpy() could fail as memcpy() from libc is GNU-IFUNC. gdb/ChangeLog 2015-05-06 Jan Kratochvil * compile/compile-object-load.c (compile_object_load): Support mst_text_gnu_ifunc. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4bfb6194622..993965863ae 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-05-06 Jan Kratochvil + + * compile/compile-object-load.c (compile_object_load): Support + mst_text_gnu_ifunc. + 2015-05-06 Jan Kratochvil * compile/compile.c (compile_to_object): Make the cmd_string parameter diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c index 8a7f2327f60..fe234489849 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\"."),