aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/Makefile.am
diff options
context:
space:
mode:
authorIgor Kudrin <ikudrin@accesssoftek.com>2016-12-19 15:23:59 -0800
committerCary Coutant <ccoutant@gmail.com>2016-12-19 15:28:28 -0800
commitee7ef219cbfbcf9217b50c4d30e719e2a6182a71 (patch)
treea10c07ee10ef2268b94eeb83f08aaa6dcefd81c2 /gold/testsuite/Makefile.am
parent89ede9f53b74f84febcd1c2a6db8b03f390b62ec (diff)
downloadgdb-ee7ef219cbfbcf9217b50c4d30e719e2a6182a71.zip
gdb-ee7ef219cbfbcf9217b50c4d30e719e2a6182a71.tar.gz
gdb-ee7ef219cbfbcf9217b50c4d30e719e2a6182a71.tar.bz2
Fix an internal error in the constructor of Target_arm.
gold/ * arm.cc (Target_arm::Target_arm): Move initialization code ... (Target_arm::do_select_as_default_target): ... to here. * testsuite/Makefile.am (arm_target_lazy_init): New test case. * testsuite/Makefile.in: Regenerate. * testsuite/arm_target_lazy_init.s: New source file. * testsuite/arm_target_lazy_init.t: New linker script.
Diffstat (limited to 'gold/testsuite/Makefile.am')
-rw-r--r--gold/testsuite/Makefile.am8
1 files changed, 8 insertions, 0 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index ab743c7..0e6f5d1 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -3721,6 +3721,14 @@ arm_target2.o: arm_target2.s
MOSTLYCLEANFILES += arm_target1_abs arm_target1_rel \
arm_target2_rel arm_target2_abs arm_target2_got_rel
+# The test demonstrates why the constructor of a target object should not access options.
+check_DATA += arm_target_lazy_init
+MOSTLYCLEANFILES += arm_target_lazy_init
+arm_target_lazy_init: arm_target_lazy_init.o arm_target_lazy_init.t ../ld-new
+ ../ld-new -T $(srcdir)/arm_target_lazy_init.t -o $@ $<
+arm_target_lazy_init.o: arm_target_lazy_init.s
+ $(TEST_AS) -EL -o $@ $<
+
endif DEFAULT_TARGET_ARM
if DEFAULT_TARGET_AARCH64