+2015-01-22 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * compile/compile.c (_initialize_compile): Use -fPIE for compile_args.
+
2015-01-22 Eli Zaretskii <eliz@gnu.org>
* Makefile.in (HFILES_NO_SRCDIR): Remove ada-varobj.h.
/* Override flags possibly coming from DW_AT_producer. */
compile_args = xstrdup ("-O0 -gdwarf-4"
- /* We use -fPIC Otherwise GDB would need to reserve space large enough for
+ /* We use -fPIE Otherwise GDB would need to reserve space large enough for
any object file in the inferior in advance to get the final address when
to link the object file to and additionally the default system linker
script would need to be modified so that one can specify there the
- absolute target address. */
- " -fPIC"
+ absolute target address.
+ -fPIC is not used at is would require from GDB to generate .got. */
+ " -fPIE"
/* We don't want warnings. */
" -w"
/* Override CU's possible -fstack-protector-strong. */
+2015-01-22 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdb.compile/compile.exp (pointer to jit function): New test.
+
2015-01-17 Wei-cheng Wang <cole945@gmail.com>
* lib/gdb.exp (supports_process_record): Return true for
gdb_test "print 'compile.c'::globalshadow" " = 77000" \
"check globalshadow with -r"
+# Test GOT vs. resolving jit function pointers.
+
+gdb_test_no_output "compile -raw -- int func(){return 21;} _gdb_expr(){int (*funcp)()=func; if (funcp()!=21) abort();}" \
+ "pointer to jit function"
+
#
# Test the case where the registers structure would not normally have
# any fields.