compile: Support relocation to GNU-IFUNCs
authorJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 6 May 2015 18:59:19 +0000 (20:59 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 6 May 2015 18:59:19 +0000 (20:59 +0200)
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.

gdb/ChangeLog
gdb/compile/compile-object-load.c

index 4bfb61946222003540868ab98fe6b5879ed30b5d..993965863ae1151a84772d0eb58c9869916593fa 100644 (file)
@@ -1,3 +1,8 @@
+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
index 8a7f2327f6014d13d2f8d3edb846a3a4aa38c1ed..fe234489849de52da344a5843c19ce20e9334681 100644 (file)
@@ -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\"."),