aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2011-06-24 18:08:50 +0000
committerCary Coutant <ccoutant@google.com>2011-06-24 18:08:50 +0000
commit472076e46d7b42d99e2a9ee80c7c58b0d16d748c (patch)
tree35d70b4b952b78613c2d23d537aac39b1297b826
parent7dbf3b76a24009dfe759b42e5b8544f20c6d9529 (diff)
downloadgdb-472076e46d7b42d99e2a9ee80c7c58b0d16d748c.zip
gdb-472076e46d7b42d99e2a9ee80c7c58b0d16d748c.tar.gz
gdb-472076e46d7b42d99e2a9ee80c7c58b0d16d748c.tar.bz2
* testsuite/Makefile.am: Add in-tree assembler to gcctestdir.
(debug_msg_cdebug.o, odr_violation1_cdebug.o, odr_violation2_cdebug.o) (debug_msg_cdebug.err): New targets. * testsuite/Makefile.in: Regenerate. * testsuite/debug_msg.sh: Check output of link with compressed debug. Fix checks for link with shared library.
-rw-r--r--gold/ChangeLog9
-rw-r--r--gold/testsuite/Makefile.am29
-rw-r--r--gold/testsuite/Makefile.in152
-rwxr-xr-xgold/testsuite/debug_msg.sh43
4 files changed, 162 insertions, 71 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 1169f27..fe06e41 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,12 @@
+2011-06-24 Cary Coutant <ccoutant@google.com>
+
+ * testsuite/Makefile.am: Add in-tree assembler to gcctestdir.
+ (debug_msg_cdebug.o, odr_violation1_cdebug.o, odr_violation2_cdebug.o)
+ (debug_msg_cdebug.err): New targets.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/debug_msg.sh: Check output of link with compressed debug.
+ Fix checks for link with shared library.
+
2011-06-24 Doug Kwan <dougkwan@google.com>
* arm.cc (Arm_output_section::append_text_sections_to_list): Do not
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index 5751ffc..ca486cf 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -80,6 +80,12 @@ gcctestdir/ld: ../ld-new
rm -f gcctestdir/ld
(cd gcctestdir && $(LN_S) ../../ld-new ld)
+# Some tests require the latest features of an in-tree assembler.
+gcctestdir/as: $(TEST_AS)
+ test -d gcctestdir || mkdir -p gcctestdir
+ rm -f gcctestdir/as
+ (cd gcctestdir && $(LN_S) $(abs_top_builddir)/../gas/as-new as)
+
endif GCC
check_PROGRAMS += object_unittest
@@ -863,6 +869,29 @@ debug_msg.err: debug_msg.o odr_violation1.o odr_violation2.o gcctestdir/ld
exit 1; \
fi
+
+if HAVE_ZLIB
+
+# Check that --detect-odr-violations works with compressed debug sections.
+check_DATA += debug_msg_cdebug.err
+MOSTLYCLEANFILES += debug_msg_cdebug.err
+debug_msg_cdebug.o: debug_msg.cc gcctestdir/as
+ $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/debug_msg.cc
+odr_violation1_cdebug.o: odr_violation1.cc gcctestdir/as
+ $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/odr_violation1.cc
+odr_violation2_cdebug.o: odr_violation2.cc gcctestdir/as
+ $(CXXCOMPILE) -Bgcctestdir/ -O2 -g -Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/odr_violation2.cc
+debug_msg_cdebug.err: debug_msg_cdebug.o odr_violation1_cdebug.o odr_violation2_cdebug.o gcctestdir/ld
+ @echo $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_cdebug debug_msg_cdebug.o odr_violation1_cdebug.o odr_violation2_cdebug.o "2>$@"
+ @if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_cdebug debug_msg_cdebug.o odr_violation1_cdebug.o odr_violation2_cdebug.o 2>$@; \
+ then \
+ echo 1>&2 "Link of debug_msg_cdebug should have failed"; \
+ rm -f $@; \
+ exit 1; \
+ fi
+
+endif HAVE_ZLIB
+
# See if we can also detect problems when we're linking .so's, not .o's.
check_DATA += debug_msg_so.err
MOSTLYCLEANFILES += debug_msg_so.err
diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in
index 15cd57e..20171bf 100644
--- a/gold/testsuite/Makefile.in
+++ b/gold/testsuite/Makefile.in
@@ -83,11 +83,6 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_9.sh dynamic_list.sh
# Create the data files that debug_msg.sh analyzes.
-
-# See if we can also detect problems when we're linking .so's, not .o's.
-
-# We also want to make sure we do something reasonable when there's no
-# debug info available. For the best test, we use .so's.
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_3 = incremental_test.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ gc_comdat_test.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ gc_tls_test.stdout \
@@ -103,23 +98,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_string_merge_test.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_sht_rel_addend_test.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared.dbg \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_plt_shared.so debug_msg.err \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ debug_msg_so.err \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ debug_msg_ndebug.err \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ undef_symbol.err ver_test_1.syms \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_2.syms ver_test_4.syms \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_5.syms ver_test_7.syms \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_10.syms protected_3.err \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test.stdout \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_matching_test.stdout \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_3.stdout \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_4.stdout \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_5.stdout \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_6.stdout \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_7.stdout \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_8.stdout \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_9.stdout \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ dynamic_list.stdout
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_plt_shared.so debug_msg.err
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_4 = incremental_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ gc_comdat_test gc_tls_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ gc_orphan_section_test icf_test \
@@ -209,7 +188,37 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ many_sections_check.h
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_18 = many_sections_define.h \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ many_sections_check.h \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ debug_msg.err debug_msg_so.err \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ debug_msg.err
+@GCC_FALSE@initpri1_DEPENDENCIES =
+@NATIVE_LINKER_FALSE@initpri1_DEPENDENCIES =
+@GCC_FALSE@initpri2_DEPENDENCIES =
+@NATIVE_LINKER_FALSE@initpri2_DEPENDENCIES =
+
+# Check that --detect-odr-violations works with compressed debug sections.
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@am__append_19 = debug_msg_cdebug.err
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@am__append_20 = debug_msg_cdebug.err
+
+# See if we can also detect problems when we're linking .so's, not .o's.
+
+# We also want to make sure we do something reasonable when there's no
+# debug info available. For the best test, we use .so's.
+@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_21 = debug_msg_so.err \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ debug_msg_ndebug.err \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ undef_symbol.err ver_test_1.syms \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_2.syms ver_test_4.syms \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_5.syms ver_test_7.syms \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_10.syms protected_3.err \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test.stdout \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_matching_test.stdout \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_3.stdout \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_4.stdout \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_5.stdout \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_6.stdout \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_7.stdout \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_8.stdout \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_9.stdout \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ dynamic_list.stdout
+@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_22 = debug_msg_so.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ debug_msg_ndebug.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ undef_symbol.err ver_test_11.a \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_3.err binary.txt \
@@ -223,20 +232,16 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ alt/thin_archive_test_2.o \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ alt/thin_archive_test_4.o \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ alt/libthin2.a alt/libthin4.a
-@GCC_FALSE@initpri1_DEPENDENCIES =
-@NATIVE_LINKER_FALSE@initpri1_DEPENDENCIES =
-@GCC_FALSE@initpri2_DEPENDENCIES =
-@NATIVE_LINKER_FALSE@initpri2_DEPENDENCIES =
# Test --compress-debug-sections. FIXME: check we actually compress.
# The specialfile output has a tricky case when we also compress debug
# sections, because it requires output-file resizing.
-@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@am__append_19 = flagstest_compress_debug_sections \
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@am__append_23 = flagstest_compress_debug_sections \
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ flagstest_o_specialfile_and_compress_debug_sections
# Test symbol versioning.
-@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_20 = ver_test ver_test_2 \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_24 = ver_test ver_test_2 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_6 ver_test_8 ver_test_9 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_11 protected_1 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_2 relro_test \
@@ -260,7 +265,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@NATIVE_LINKER_FALSE@thin_archive_test_2_DEPENDENCIES =
# Test plugins with -r.
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_21 = \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_25 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_1 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_2 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_3 \
@@ -269,7 +274,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_6 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_7 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_8
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_22 = \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_26 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_1.sh \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_2.sh \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_3.sh \
@@ -279,7 +284,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
# Test that symbols known in the IR file but not in the replacement file
# produce an unresolved symbol error.
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_23 = \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_27 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_1.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_2.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_3.err \
@@ -289,7 +294,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_7.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_9.err
# Make a copy of two_file_test_1.o, which does not define the symbol _Z4t16av.
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_24 = \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_28 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_1.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_2.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_3.err \
@@ -300,7 +305,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_9.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ two_file_test_1c.o \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ unused.c
-@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_25 = exclude_libs_test \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_29 = exclude_libs_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ local_labels_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_test
@@ -318,14 +323,14 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
# weak reference in a DSO.
# Test that MEMORY region support works.
-@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_26 = exclude_libs_test.sh \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_30 = exclude_libs_test.sh \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_test.sh \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ hidden_test.sh \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ retain_symbols_file_test.sh \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ no_version_test.sh \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ strong_ref_weak_def.sh \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ dyn_weak_ref.sh memory_test.sh
-@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_27 = exclude_libs_test.syms \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_31 = exclude_libs_test.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_test.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_relocatable_test1.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_relocatable_test2.syms \
@@ -335,7 +340,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ strong_ref_weak_def.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ dyn_weak_ref.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ memory_test.stdout
-@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_28 = exclude_libs_test.syms \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_32 = exclude_libs_test.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ libexclude_libs_test_1.a \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ libexclude_libs_test_2.a \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ alt/libexclude_libs_test_3.a \
@@ -361,7 +366,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ dyn_weak_ref.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ memory_test.stdout memory_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ memory_test.o
-@GCC_TRUE@@MCMODEL_MEDIUM_TRUE@@NATIVE_LINKER_TRUE@am__append_29 = large
+@GCC_TRUE@@MCMODEL_MEDIUM_TRUE@@NATIVE_LINKER_TRUE@am__append_33 = large
@GCC_FALSE@large_DEPENDENCIES =
@MCMODEL_MEDIUM_FALSE@large_DEPENDENCIES =
@NATIVE_LINKER_FALSE@large_DEPENDENCIES =
@@ -370,11 +375,11 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
# it will get execute permission.
# Check -l:foo.a
-@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_30 = permission_test \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_34 = permission_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ searched_file_test
@GCC_FALSE@searched_file_test_DEPENDENCIES =
@NATIVE_LINKER_FALSE@searched_file_test_DEPENDENCIES =
-@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__append_31 = \
+@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__append_35 = \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1static \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1picstatic \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1 \
@@ -428,16 +433,16 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@NATIVE_LINKER_FALSE@ifuncmain7_DEPENDENCIES =
# Test that --start-lib and --end-lib function correctly.
-@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_32 = start_lib_test
+@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_36 = start_lib_test
# End-to-end incremental linking tests.
# Incremental linking is currently supported only on the x86_64 target.
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_33 = incremental_test_2 \
+@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_37 = incremental_test_2 \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_3 \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_4 \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_copy_test \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_common_test_1
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_34 = two_file_test_tmp_2.o \
+@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_38 = two_file_test_tmp_2.o \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_tmp_3.o \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_4.base \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_tmp_4.o
@@ -445,27 +450,27 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
# These tests work with native and cross linkers.
# Test script section order.
-@NATIVE_OR_CROSS_LINKER_TRUE@am__append_35 = script_test_10.sh
-@NATIVE_OR_CROSS_LINKER_TRUE@am__append_36 = script_test_10.stdout
+@NATIVE_OR_CROSS_LINKER_TRUE@am__append_39 = script_test_10.sh
+@NATIVE_OR_CROSS_LINKER_TRUE@am__append_40 = script_test_10.stdout
# These tests work with cross linkers only.
-@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_37 = split_i386.sh
-@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_38 = split_i386_1.stdout split_i386_2.stdout \
+@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_41 = split_i386.sh
+@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_42 = split_i386_1.stdout split_i386_2.stdout \
@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_i386_3.stdout split_i386_4.stdout split_i386_r.stdout
-@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_39 = split_i386_1 split_i386_2 split_i386_3 \
+@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_43 = split_i386_1 split_i386_2 split_i386_3 \
@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_i386_4 split_i386_r
-@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_40 = split_x86_64.sh
-@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_41 = split_x86_64_1.stdout split_x86_64_2.stdout \
+@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_44 = split_x86_64.sh
+@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_45 = split_x86_64_1.stdout split_x86_64_2.stdout \
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_x86_64_3.stdout split_x86_64_4.stdout split_x86_64_r.stdout
-@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_42 = split_x86_64_1 split_x86_64_2 split_x86_64_3 \
+@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_46 = split_x86_64_1 split_x86_64_2 split_x86_64_3 \
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_x86_64_4 split_x86_64_r
# Cortex-A8 workaround test.
-@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_43 = arm_abs_global.sh \
+@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_47 = arm_abs_global.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_branch_in_range.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_branch_out_of_range.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_fix_v4bx.sh \
@@ -473,7 +478,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_cortex_a8.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_exidx_test.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ pr12826.sh
-@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_44 = arm_abs_global.stdout \
+@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_48 = arm_abs_global.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_bl_in_range.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_bl_out_of_range.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ thumb_bl_in_range.stdout \
@@ -499,7 +504,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_cortex_a8_local_reloc.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_exidx_test.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ pr12826.stdout
-@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_45 = arm_abs_global \
+@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_49 = arm_abs_global \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_bl_in_range \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_bl_out_of_range \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ thumb_bl_in_range \
@@ -1810,19 +1815,20 @@ TEST_AS = $(top_builddir)/../gas/as-new
# improve on that here. automake-1.9 info docs say "mostlyclean" is
# the right choice for files 'make' builds that people rebuild.
MOSTLYCLEANFILES = *.so *.syms *.stdout $(am__append_4) \
- $(am__append_9) $(am__append_18) $(am__append_24) \
- $(am__append_28) $(am__append_34) $(am__append_39) \
- $(am__append_42) $(am__append_45)
+ $(am__append_9) $(am__append_18) $(am__append_20) \
+ $(am__append_22) $(am__append_28) $(am__append_32) \
+ $(am__append_38) $(am__append_43) $(am__append_46) \
+ $(am__append_49)
# We will add to these later, for each individual test. Note
# that we add each test under check_SCRIPTS or check_PROGRAMS;
# the TESTS variable is automatically populated from these.
-check_SCRIPTS = $(am__append_2) $(am__append_22) $(am__append_26) \
- $(am__append_35) $(am__append_37) $(am__append_40) \
- $(am__append_43)
-check_DATA = $(am__append_3) $(am__append_23) $(am__append_27) \
- $(am__append_36) $(am__append_38) $(am__append_41) \
- $(am__append_44)
+check_SCRIPTS = $(am__append_2) $(am__append_26) $(am__append_30) \
+ $(am__append_39) $(am__append_41) $(am__append_44) \
+ $(am__append_47)
+check_DATA = $(am__append_3) $(am__append_19) $(am__append_21) \
+ $(am__append_27) $(am__append_31) $(am__append_40) \
+ $(am__append_42) $(am__append_45) $(am__append_48)
BUILT_SOURCES = $(am__append_17)
TESTS = $(check_SCRIPTS) $(check_PROGRAMS)
@@ -3851,6 +3857,12 @@ uninstall-am:
@GCC_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ rm -f gcctestdir/ld
@GCC_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ (cd gcctestdir && $(LN_S) ../../ld-new ld)
+# Some tests require the latest features of an in-tree assembler.
+@GCC_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@gcctestdir/as: $(TEST_AS)
+@GCC_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ test -d gcctestdir || mkdir -p gcctestdir
+@GCC_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ rm -f gcctestdir/as
+@GCC_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ (cd gcctestdir && $(LN_S) $(abs_top_builddir)/../gas/as-new as)
+
# ---------------------------------------------------------------------
# These tests test the output of gold (end-to-end tests). In
# particular, they make sure that gold can link "difficult" object
@@ -4164,6 +4176,20 @@ uninstall-am:
@GCC_TRUE@@NATIVE_LINKER_TRUE@ rm -f $@; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exit 1; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ fi
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@debug_msg_cdebug.o: debug_msg.cc gcctestdir/as
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/debug_msg.cc
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@odr_violation1_cdebug.o: odr_violation1.cc gcctestdir/as
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/odr_violation1.cc
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@odr_violation2_cdebug.o: odr_violation2.cc gcctestdir/as
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -Bgcctestdir/ -O2 -g -Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/odr_violation2.cc
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@debug_msg_cdebug.err: debug_msg_cdebug.o odr_violation1_cdebug.o odr_violation2_cdebug.o gcctestdir/ld
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ @echo $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_cdebug debug_msg_cdebug.o odr_violation1_cdebug.o odr_violation2_cdebug.o "2>$@"
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ @if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_cdebug debug_msg_cdebug.o odr_violation1_cdebug.o odr_violation2_cdebug.o 2>$@; \
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ then \
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ echo 1>&2 "Link of debug_msg_cdebug should have failed"; \
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ rm -f $@; \
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ exit 1; \
+@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ fi
@GCC_TRUE@@NATIVE_LINKER_TRUE@debug_msg.so: debug_msg.cc gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -shared -fPIC -w -o $@ $(srcdir)/debug_msg.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@odr_violation1.so: odr_violation1.cc gcctestdir/ld
diff --git a/gold/testsuite/debug_msg.sh b/gold/testsuite/debug_msg.sh
index 9a6f2d5..c0d03b3 100755
--- a/gold/testsuite/debug_msg.sh
+++ b/gold/testsuite/debug_msg.sh
@@ -90,6 +90,33 @@ check debug_msg.err ": symbol 'SometimesInlineFunction(int)' defined in multiple
check debug_msg.err "debug_msg.cc:68"
check debug_msg.err "odr_violation2.cc:27"
+# Check for the same error messages when using --compressed-debug-sections.
+if test -r debug_msg_cdebug.err
+then
+ check debug_msg_cdebug.err "debug_msg_cdebug.o:debug_msg.cc:function fn_array: error: undefined reference to 'undef_fn1()'"
+ check debug_msg_cdebug.err "debug_msg_cdebug.o:debug_msg.cc:function fn_array: error: undefined reference to 'undef_fn2()'"
+ check debug_msg_cdebug.err "debug_msg_cdebug.o:debug_msg.cc:function badref1: error: undefined reference to 'undef_int'"
+ check debug_msg_cdebug.err ".*/debug_msg.cc:50: error: undefined reference to 'undef_fn1()'"
+ check debug_msg_cdebug.err ".*/debug_msg.cc:55: error: undefined reference to 'undef_fn2()'"
+ check debug_msg_cdebug.err ".*/debug_msg.cc:43: error: undefined reference to 'undef_fn1()'"
+ check debug_msg_cdebug.err ".*/debug_msg.cc:44: error: undefined reference to 'undef_fn2()'"
+ check debug_msg_cdebug.err ".*/debug_msg.cc:.*: error: undefined reference to 'undef_int'"
+ check debug_msg_cdebug.err ".*/debug_msg.cc:43: error: undefined reference to 'undef_fn1()'"
+ check debug_msg_cdebug.err ".*/debug_msg.cc:44: error: undefined reference to 'undef_fn2()'"
+ check debug_msg_cdebug.err ".*/debug_msg.cc:.*: error: undefined reference to 'undef_int'"
+ check debug_msg_cdebug.err ": symbol 'Ordering::operator()(int, int)' defined in multiple places (possible ODR violation):"
+ check debug_msg_cdebug.err "odr_violation1.cc:6"
+ check debug_msg_cdebug.err "odr_violation2.cc:12"
+ check_missing debug_msg_cdebug.err "OdrDerived::~OdrDerived()"
+ check_missing debug_msg_cdebug.err "__adjust_heap"
+ check_missing debug_msg_cdebug.err ": symbol 'OverriddenCFunction' defined in multiple places (possible ODR violation):"
+ check_missing debug_msg_cdebug.err "odr_violation1.cc:16"
+ check_missing debug_msg_cdebug.err "odr_violation2.cc:23"
+ check debug_msg_cdebug.err ": symbol 'SometimesInlineFunction(int)' defined in multiple places (possible ODR violation):"
+ check debug_msg_cdebug.err "debug_msg.cc:68"
+ check debug_msg_cdebug.err "odr_violation2.cc:27"
+fi
+
# When linking together .so's, we don't catch the line numbers, but we
# still find all the undefined variables, and the ODR violation.
check debug_msg_so.err "debug_msg.so: error: undefined reference to 'undef_fn1()'"
@@ -98,14 +125,14 @@ check debug_msg_so.err "debug_msg.so: error: undefined reference to 'undef_int'"
check debug_msg_so.err ": symbol 'Ordering::operator()(int, int)' defined in multiple places (possible ODR violation):"
check debug_msg_so.err "odr_violation1.cc:6"
check debug_msg_so.err "odr_violation2.cc:12"
-check_missing debug_msg.err "OdrDerived::~OdrDerived()"
-check_missing debug_msg.err "__adjust_heap"
-check_missing debug_msg.err ": symbol 'OverriddenCFunction' defined in multiple places (possible ODR violation):"
-check_missing debug_msg.err "odr_violation1.cc:16"
-check_missing debug_msg.err "odr_violation2.cc:23"
-check debug_msg.err ": symbol 'SometimesInlineFunction(int)' defined in multiple places (possible ODR violation):"
-check debug_msg.err "debug_msg.cc:68"
-check debug_msg.err "odr_violation2.cc:27"
+check_missing debug_msg_so.err "OdrDerived::~OdrDerived()"
+check_missing debug_msg_so.err "__adjust_heap"
+check_missing debug_msg_so.err ": symbol 'OverriddenCFunction' defined in multiple places (possible ODR violation):"
+check_missing debug_msg_so.err "odr_violation1.cc:16"
+check_missing debug_msg_so.err "odr_violation2.cc:23"
+check debug_msg_so.err ": symbol 'SometimesInlineFunction(int)' defined in multiple places (possible ODR violation):"
+check debug_msg_so.err "debug_msg.cc:68"
+check debug_msg_so.err "odr_violation2.cc:27"
# These messages shouldn't need any debug info to detect:
check debug_msg_ndebug.err "debug_msg_ndebug.so: error: undefined reference to 'undef_fn1()'"