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.
This commit is contained in:
Jan Kratochvil 2015-05-06 20:59:19 +02:00
parent 851c90917f
commit e26efa4066
2 changed files with 9 additions and 0 deletions

View 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

View 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\"."),