aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2012-07-19 00:19:35 +0000
committerCary Coutant <ccoutant@google.com>2012-07-19 00:19:35 +0000
commitf1415016b687b6b9d1f5c53c91036f8a565b2c52 (patch)
treeae5f1559956306b9cca49394a0dca17bd1906e1c
parentf3718686b5694f783836b5c36f9237e44c4944e3 (diff)
downloadgdb-f1415016b687b6b9d1f5c53c91036f8a565b2c52.zip
gdb-f1415016b687b6b9d1f5c53c91036f8a565b2c52.tar.gz
gdb-f1415016b687b6b9d1f5c53c91036f8a565b2c52.tar.bz2
2012-07-18 Cary Coutant <ccoutant@google.com>
PR gold/14344 * configure.ac: Add check for -gpubnames support. * configure: Regenerate. * testsuite/Makefile.am (gdb_index_test_1): Add check for -gpubnames support; force -gno-pubnames. (gdb_index_test_2, gdb_index_test_3): Add check for -gpubnames support. (gdb_index_test_4): New test. * testsuite/Makefile.in: Regenerate. * testsuite/gdb_index_test_1.sh: Refactor code into common file. * testsuite/gdb_index_test_2.sh: Likewise. * testsuite/gdb_index_test_3.sh: Don't look for space after colon. * testsuite/gdb_index_test_4.sh: New script. * testsuite/gdb_index_test_comm.sh: New script with common code; don't look for space after colon.
-rw-r--r--gold/ChangeLog18
-rwxr-xr-xgold/configure28
-rw-r--r--gold/configure.ac7
-rw-r--r--gold/testsuite/Makefile.am21
-rw-r--r--gold/testsuite/Makefile.in124
-rwxr-xr-xgold/testsuite/gdb_index_test_1.sh61
-rwxr-xr-xgold/testsuite/gdb_index_test_2.sh61
-rwxr-xr-xgold/testsuite/gdb_index_test_3.sh8
-rwxr-xr-xgold/testsuite/gdb_index_test_4.sh25
-rwxr-xr-xgold/testsuite/gdb_index_test_comm.sh84
10 files changed, 257 insertions, 180 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 1e50690..e78d98b 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,21 @@
+2012-07-18 Cary Coutant <ccoutant@google.com>
+
+ PR gold/14344
+ * configure.ac: Add check for -gpubnames support.
+ * configure: Regenerate.
+ * testsuite/Makefile.am (gdb_index_test_1): Add check for -gpubnames
+ support; force -gno-pubnames.
+ (gdb_index_test_2, gdb_index_test_3): Add check for -gpubnames
+ support.
+ (gdb_index_test_4): New test.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/gdb_index_test_1.sh: Refactor code into common file.
+ * testsuite/gdb_index_test_2.sh: Likewise.
+ * testsuite/gdb_index_test_3.sh: Don't look for space after colon.
+ * testsuite/gdb_index_test_4.sh: New script.
+ * testsuite/gdb_index_test_comm.sh: New script with common code;
+ don't look for space after colon.
+
2012-07-16 Sriraman Tallam <tmsriram@google.com>
* gold.cc (queue_middle_tasks): Update function order only after
diff --git a/gold/configure b/gold/configure
index b9967ae..0bffe08 100755
--- a/gold/configure
+++ b/gold/configure
@@ -594,6 +594,8 @@ LTLIBOBJS
MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
+HAVE_PUBNAMES_FALSE
+HAVE_PUBNAMES_TRUE
CXXCPP
HAVE_ZLIB_FALSE
HAVE_ZLIB_TRUE
@@ -7365,6 +7367,28 @@ $as_echo "#define HAVE_STAT_ST_MTIM 1" >>confdefs.h
fi
+save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS -gpubnames"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int i;
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ have_pubnames=yes
+else
+ have_pubnames=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CXXFLAGS="$save_CXXFLAGS"
+ if test "$have_pubnames" = "yes"; then
+ HAVE_PUBNAMES_TRUE=
+ HAVE_PUBNAMES_FALSE='#'
+else
+ HAVE_PUBNAMES_TRUE='#'
+ HAVE_PUBNAMES_FALSE=
+fi
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -7657,6 +7681,10 @@ if test -z "${HAVE_ZLIB_TRUE}" && test -z "${HAVE_ZLIB_FALSE}"; then
as_fn_error "conditional \"HAVE_ZLIB\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${HAVE_PUBNAMES_TRUE}" && test -z "${HAVE_PUBNAMES_FALSE}"; then
+ as_fn_error "conditional \"HAVE_PUBNAMES\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/gold/configure.ac b/gold/configure.ac
index 5e3dc06..05e807b 100644
--- a/gold/configure.ac
+++ b/gold/configure.ac
@@ -562,6 +562,13 @@ if test "$gold_cv_stat_st_mtim" = "yes"; then
[Define if struct stat has a field st_mtim with timespec for mtime])
fi
+dnl Check if gcc supports the -gpubnames option.
+save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS -gpubnames"
+AC_COMPILE_IFELSE([int i;], [have_pubnames=yes], [have_pubnames=no])
+CXXFLAGS="$save_CXXFLAGS"
+AM_CONDITIONAL(HAVE_PUBNAMES, test "$have_pubnames" = "yes")
+
AC_LANG_POP(C++)
AC_CHECK_HEADERS(locale.h)
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index 1c970a3..b8b88e8 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -1967,12 +1967,14 @@ memory_test: memory_test.o gcctestdir/ld $(srcdir)/memory_test.t
memory_test.stdout: memory_test
$(TEST_READELF) -lWS $< > $@
-# Test that --gdb-index functions correctly.
+if HAVE_PUBNAMES
+
+# Test that --gdb-index functions correctly without gcc-generated pubnames.
check_SCRIPTS += gdb_index_test_1.sh
check_DATA += gdb_index_test_1.stdout
MOSTLYCLEANFILES += gdb_index_test_1.stdout gdb_index_test_1
gdb_index_test.o: gdb_index_test.cc
- $(CXXCOMPILE) -O0 -g -c -o $@ $<
+ $(CXXCOMPILE) -O0 -g -gno-pubnames -c -o $@ $<
gdb_index_test_1: gdb_index_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -Wl,--gdb-index $<
gdb_index_test_1.stdout: gdb_index_test_1
@@ -1980,6 +1982,7 @@ gdb_index_test_1.stdout: gdb_index_test_1
if HAVE_ZLIB
+# Test that --gdb-index functions correctly with compressed debug sections.
check_SCRIPTS += gdb_index_test_2.sh
check_DATA += gdb_index_test_2.stdout
MOSTLYCLEANFILES += gdb_index_test_2.stdout gdb_index_test_2
@@ -1992,7 +1995,7 @@ gdb_index_test_2.stdout: gdb_index_test_2
endif HAVE_ZLIB
-# Another simple C test (DW_AT_high_pc encoding) for --gdb-index
+# Another simple C test (DW_AT_high_pc encoding) for --gdb-index.
check_SCRIPTS += gdb_index_test_3.sh
check_DATA += gdb_index_test_3.stdout
MOSTLYCLEANFILES += gdb_index_test_3.stdout gdb_index_test_3
@@ -2003,6 +2006,18 @@ gdb_index_test_3: gdb_index_test_3.o gcctestdir/ld
gdb_index_test_3.stdout: gdb_index_test_3
$(TEST_READELF) --debug-dump=gdb_index $< > $@
+# Test that --gdb-index functions correctly with gcc-generated pubnames.
+check_SCRIPTS += gdb_index_test_4.sh
+check_DATA += gdb_index_test_4.stdout
+MOSTLYCLEANFILES += gdb_index_test_4.stdout gdb_index_test_4
+gdb_index_test_pub.o: gdb_index_test.cc
+ $(CXXCOMPILE) -O0 -g -gpubnames -c -o $@ $<
+gdb_index_test_4: gdb_index_test_pub.o gcctestdir/ld
+ $(CXXLINK) -Bgcctestdir/ -Wl,--gdb-index $<
+gdb_index_test_4.stdout: gdb_index_test_4
+ $(TEST_READELF) --debug-dump=gdb_index $< > $@
+
+endif HAVE_PUBNAMES
# End-to-end incremental linking tests.
# Incremental linking is currently supported only on the x86_64 target.
diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in
index d67c1c6..4887827 100644
--- a/gold/testsuite/Makefile.in
+++ b/gold/testsuite/Makefile.in
@@ -360,16 +360,13 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
# weak reference in a DSO.
# Test that MEMORY region support works.
-
-# Test that --gdb-index functions correctly.
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_38 = 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@ gdb_index_test_1.sh
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ dyn_weak_ref.sh memory_test.sh
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_39 = exclude_libs_test.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_test.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_relocatable_test1.syms \
@@ -379,8 +376,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ no_version_test.stdout \
@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@ gdb_index_test_1.stdout
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ memory_test.stdout
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_40 = exclude_libs_test.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ libexclude_libs_test_1.a \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ libexclude_libs_test_2.a \
@@ -406,9 +402,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ dyn_weak_ref_2.so \
@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@@NATIVE_LINKER_TRUE@ gdb_index_test_1.stdout \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ gdb_index_test_1
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ memory_test.o
@GCC_TRUE@@MCMODEL_MEDIUM_TRUE@@NATIVE_LINKER_TRUE@am__append_41 = large
@GCC_FALSE@large_DEPENDENCIES =
@MCMODEL_MEDIUM_FALSE@large_DEPENDENCIES =
@@ -483,18 +477,32 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
# Test that --start-lib and --end-lib function correctly.
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_53 = start_lib_test
-@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@am__append_54 = gdb_index_test_2.sh
-@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@am__append_55 = gdb_index_test_2.stdout
-@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@am__append_56 = gdb_index_test_2.stdout gdb_index_test_2
-# Another simple C test (DW_AT_high_pc encoding) for --gdb-index
-@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_57 = gdb_index_test_3.sh
-@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_58 = gdb_index_test_3.stdout
-@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_59 = gdb_index_test_3.stdout gdb_index_test_3
+# Test that --gdb-index functions correctly without gcc-generated pubnames.
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@am__append_54 = gdb_index_test_1.sh
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@am__append_55 = gdb_index_test_1.stdout
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@am__append_56 = gdb_index_test_1.stdout gdb_index_test_1
+
+# Test that --gdb-index functions correctly with compressed debug sections.
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@am__append_57 = gdb_index_test_2.sh
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@am__append_58 = gdb_index_test_2.stdout
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@am__append_59 = gdb_index_test_2.stdout gdb_index_test_2
+
+# Another simple C test (DW_AT_high_pc encoding) for --gdb-index.
+
+# Test that --gdb-index functions correctly with gcc-generated pubnames.
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@am__append_60 = gdb_index_test_3.sh \
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@ gdb_index_test_4.sh
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@am__append_61 = gdb_index_test_3.stdout \
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@ gdb_index_test_4.stdout
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@am__append_62 = gdb_index_test_3.stdout \
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@ gdb_index_test_3 \
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@ gdb_index_test_4.stdout \
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@ gdb_index_test_4
# Test the --incremental-unchanged flag with an archive library.
# The second link should not update the library.
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_60 = incremental_test_2 \
+@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_63 = 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_test_5 \
@@ -502,7 +510,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@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@ incremental_comdat_test_1
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_61 = two_file_test_tmp_2.o \
+@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_64 = 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 \
@@ -512,22 +520,22 @@ 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_62 = script_test_10.sh
-@NATIVE_OR_CROSS_LINKER_TRUE@am__append_63 = script_test_10.stdout
+@NATIVE_OR_CROSS_LINKER_TRUE@am__append_65 = script_test_10.sh
+@NATIVE_OR_CROSS_LINKER_TRUE@am__append_66 = script_test_10.stdout
# These tests work with cross linkers only.
-@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_64 = split_i386.sh
-@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_65 = split_i386_1.stdout split_i386_2.stdout \
+@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_67 = split_i386.sh
+@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_68 = 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_66 = split_i386_1 split_i386_2 split_i386_3 \
+@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_69 = 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_67 = split_x86_64.sh
-@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_68 = split_x86_64_1.stdout split_x86_64_2.stdout \
+@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_70 = split_x86_64.sh
+@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_71 = 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_69 = split_x86_64_1 split_x86_64_2 split_x86_64_3 \
+@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_72 = 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
@@ -542,7 +550,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
# Check Thumb to Thumb farcall veneers
# Check Thumb to ARM farcall veneers
-@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_70 = arm_abs_global.sh \
+@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_73 = 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 \
@@ -556,7 +564,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_farcall_arm_thumb.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_farcall_thumb_thumb.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_farcall_thumb_arm.sh
-@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_71 = arm_abs_global.stdout \
+@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_74 = 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 \
@@ -601,7 +609,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_farcall_thumb_thumb_6m.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_farcall_thumb_arm.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_farcall_thumb_arm_5t.stdout
-@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_72 = arm_abs_global \
+@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_75 = 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 \
@@ -2012,19 +2020,21 @@ TEST_AS = $(top_builddir)/../gas/as-new
MOSTLYCLEANFILES = *.so *.syms *.stdout $(am__append_4) \
$(am__append_17) $(am__append_26) $(am__append_28) \
$(am__append_30) $(am__append_36) $(am__append_40) \
- $(am__append_56) $(am__append_59) $(am__append_61) \
- $(am__append_66) $(am__append_69) $(am__append_72)
+ $(am__append_56) $(am__append_59) $(am__append_62) \
+ $(am__append_64) $(am__append_69) $(am__append_72) \
+ $(am__append_75)
# 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_34) $(am__append_38) \
- $(am__append_54) $(am__append_57) $(am__append_62) \
- $(am__append_64) $(am__append_67) $(am__append_70)
+ $(am__append_54) $(am__append_57) $(am__append_60) \
+ $(am__append_65) $(am__append_67) $(am__append_70) \
+ $(am__append_73)
check_DATA = $(am__append_3) $(am__append_27) $(am__append_29) \
$(am__append_35) $(am__append_39) $(am__append_55) \
- $(am__append_58) $(am__append_63) $(am__append_65) \
- $(am__append_68) $(am__append_71)
+ $(am__append_58) $(am__append_61) $(am__append_66) \
+ $(am__append_68) $(am__append_71) $(am__append_74)
BUILT_SOURCES = $(am__append_25)
TESTS = $(check_SCRIPTS) $(check_PROGRAMS)
@@ -3743,6 +3753,8 @@ gdb_index_test_2.sh.log: gdb_index_test_2.sh
@p='gdb_index_test_2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
gdb_index_test_3.sh.log: gdb_index_test_3.sh
@p='gdb_index_test_3.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+gdb_index_test_4.sh.log: gdb_index_test_4.sh
+ @p='gdb_index_test_4.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
script_test_10.sh.log: script_test_10.sh
@p='script_test_10.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
split_i386.sh.log: split_i386.sh
@@ -5064,24 +5076,30 @@ uninstall-am:
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -nostartfiles -nostdlib -T $(srcdir)/memory_test.t -o $@ memory_test.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@memory_test.stdout: memory_test
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -lWS $< > $@
-@GCC_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test.o: gdb_index_test.cc
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -g -c -o $@ $<
-@GCC_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_1: gdb_index_test.o gcctestdir/ld
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -Wl,--gdb-index $<
-@GCC_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_1.stdout: gdb_index_test_1
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) --debug-dump=gdb_index $< > $@
-@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_cdebug.o: gdb_index_test.cc
-@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -Wa,--compress-debug-sections -c -o $@ $<
-@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_2: gdb_index_test_cdebug.o gcctestdir/ld
-@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -Wl,--gdb-index $<
-@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_2.stdout: gdb_index_test_2
-@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) --debug-dump=gdb_index $< > $@
-@GCC_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_3.o: gdb_index_test_3.c
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -O0 -g -c -o $@ $<
-@GCC_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_3: gdb_index_test_3.o gcctestdir/ld
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -Wl,--gdb-index,--fatal-warnings $<
-@GCC_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_3.stdout: gdb_index_test_3
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) --debug-dump=gdb_index $< > $@
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test.o: gdb_index_test.cc
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -g -gno-pubnames -c -o $@ $<
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_1: gdb_index_test.o gcctestdir/ld
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -Wl,--gdb-index $<
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_1.stdout: gdb_index_test_1
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) --debug-dump=gdb_index $< > $@
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_cdebug.o: gdb_index_test.cc
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -Wa,--compress-debug-sections -c -o $@ $<
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_2: gdb_index_test_cdebug.o gcctestdir/ld
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -Wl,--gdb-index $<
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_2.stdout: gdb_index_test_2
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) --debug-dump=gdb_index $< > $@
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_3.o: gdb_index_test_3.c
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -O0 -g -c -o $@ $<
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_3: gdb_index_test_3.o gcctestdir/ld
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -Wl,--gdb-index,--fatal-warnings $<
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_3.stdout: gdb_index_test_3
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) --debug-dump=gdb_index $< > $@
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_pub.o: gdb_index_test.cc
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -g -gpubnames -c -o $@ $<
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_4: gdb_index_test_pub.o gcctestdir/ld
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -Wl,--gdb-index $<
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@gdb_index_test_4.stdout: gdb_index_test_4
+@GCC_TRUE@@HAVE_PUBNAMES_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) --debug-dump=gdb_index $< > $@
# End-to-end incremental linking tests.
# Incremental linking is currently supported only on the x86_64 target.
diff --git a/gold/testsuite/gdb_index_test_1.sh b/gold/testsuite/gdb_index_test_1.sh
index 9221f7f..f04c8a7 100755
--- a/gold/testsuite/gdb_index_test_1.sh
+++ b/gold/testsuite/gdb_index_test_1.sh
@@ -22,63 +22,4 @@
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
# MA 02110-1301, USA.
-check()
-{
- if ! grep -q "$2" "$1"
- then
- echo "Did not find expected output:"
- echo " $2"
- echo ""
- echo "Actual error output below:"
- cat "$1"
- exit 1
- fi
-}
-
-STDOUT=gdb_index_test_1.stdout
-
-check $STDOUT "^Version [45]"
-
-# Look for the symbols we know should be in the symbol table.
-
-check $STDOUT "^\[ *[0-9]*\] (anonymous namespace): "
-check $STDOUT "^\[ *[0-9]*\] (anonymous namespace)::c1_count: "
-check $STDOUT "^\[ *[0-9]*\] (anonymous namespace)::c2_count: "
-check $STDOUT "^\[ *[0-9]*\] bool: "
-check $STDOUT "^\[ *[0-9]*\] check<one::c1>: "
-check $STDOUT "^\[ *[0-9]*\] check<two::c2<double> >: "
-check $STDOUT "^\[ *[0-9]*\] check<two::c2<int> >: "
-# check $STDOUT "^\[ *[0-9]*\] check<two::c2<int const\*> >: "
-check $STDOUT "^\[ *[0-9]*\] double: "
-check $STDOUT "^\[ *[0-9]*\] F_A: "
-check $STDOUT "^\[ *[0-9]*\] F_B: "
-check $STDOUT "^\[ *[0-9]*\] F_C: "
-check $STDOUT "^\[ *[0-9]*\] int: "
-check $STDOUT "^\[ *[0-9]*\] main: "
-check $STDOUT "^\[ *[0-9]*\] one: "
-check $STDOUT "^\[ *[0-9]*\] one::c1: "
-check $STDOUT "^\[ *[0-9]*\] one::c1::~c1: "
-check $STDOUT "^\[ *[0-9]*\] one::c1::c1: "
-check $STDOUT "^\[ *[0-9]*\] one::c1::val: "
-check $STDOUT "^\[ *[0-9]*\] one::c1v: "
-check $STDOUT "^\[ *[0-9]*\] one::G_A: "
-check $STDOUT "^\[ *[0-9]*\] one::G_B: "
-check $STDOUT "^\[ *[0-9]*\] one::G_B: "
-check $STDOUT "^\[ *[0-9]*\] two: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<double>::~c2: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<double>::c2: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<double>::val: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<double>: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<int const\*>: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<int const\*>::~c2: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<int const\*>::c2: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<int const\*>::val: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<int>::~c2: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<int>::c2: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<int>::val: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<int>: "
-check $STDOUT "^\[ *[0-9]*\] two::c2v1: "
-check $STDOUT "^\[ *[0-9]*\] two::c2v2: "
-check $STDOUT "^\[ *[0-9]*\] anonymous_union_var: "
-
-exit 0
+exec ${srcdir}/gdb_index_test_comm.sh gdb_index_test_1.stdout
diff --git a/gold/testsuite/gdb_index_test_2.sh b/gold/testsuite/gdb_index_test_2.sh
index 99928bf..e31aa42 100755
--- a/gold/testsuite/gdb_index_test_2.sh
+++ b/gold/testsuite/gdb_index_test_2.sh
@@ -22,63 +22,4 @@
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
# MA 02110-1301, USA.
-check()
-{
- if ! grep -q "$2" "$1"
- then
- echo "Did not find expected output:"
- echo " $2"
- echo ""
- echo "Actual error output below:"
- cat "$1"
- exit 1
- fi
-}
-
-STDOUT=gdb_index_test_2.stdout
-
-check $STDOUT "^Version [45]"
-
-# Look for the symbols we know should be in the symbol table.
-
-check $STDOUT "^\[ *[0-9]*\] (anonymous namespace): "
-check $STDOUT "^\[ *[0-9]*\] (anonymous namespace)::c1_count: "
-check $STDOUT "^\[ *[0-9]*\] (anonymous namespace)::c2_count: "
-check $STDOUT "^\[ *[0-9]*\] bool: "
-check $STDOUT "^\[ *[0-9]*\] check<one::c1>: "
-check $STDOUT "^\[ *[0-9]*\] check<two::c2<double> >: "
-check $STDOUT "^\[ *[0-9]*\] check<two::c2<int> >: "
-# check $STDOUT "^\[ *[0-9]*\] check<two::c2<int const\*> >: "
-check $STDOUT "^\[ *[0-9]*\] double: "
-check $STDOUT "^\[ *[0-9]*\] F_A: "
-check $STDOUT "^\[ *[0-9]*\] F_B: "
-check $STDOUT "^\[ *[0-9]*\] F_C: "
-check $STDOUT "^\[ *[0-9]*\] int: "
-check $STDOUT "^\[ *[0-9]*\] main: "
-check $STDOUT "^\[ *[0-9]*\] one: "
-check $STDOUT "^\[ *[0-9]*\] one::c1: "
-check $STDOUT "^\[ *[0-9]*\] one::c1::~c1: "
-check $STDOUT "^\[ *[0-9]*\] one::c1::c1: "
-check $STDOUT "^\[ *[0-9]*\] one::c1::val: "
-check $STDOUT "^\[ *[0-9]*\] one::c1v: "
-check $STDOUT "^\[ *[0-9]*\] one::G_A: "
-check $STDOUT "^\[ *[0-9]*\] one::G_B: "
-check $STDOUT "^\[ *[0-9]*\] one::G_B: "
-check $STDOUT "^\[ *[0-9]*\] two: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<double>::~c2: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<double>::c2: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<double>::val: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<double>: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<int const\*>: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<int const\*>::~c2: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<int const\*>::c2: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<int const\*>::val: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<int>::~c2: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<int>::c2: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<int>::val: "
-check $STDOUT "^\[ *[0-9]*\] two::c2<int>: "
-check $STDOUT "^\[ *[0-9]*\] two::c2v1: "
-check $STDOUT "^\[ *[0-9]*\] two::c2v2: "
-check $STDOUT "^\[ *[0-9]*\] anonymous_union_var: "
-
-exit 0
+exec ${srcdir}/gdb_index_test_comm.sh gdb_index_test_2.stdout
diff --git a/gold/testsuite/gdb_index_test_3.sh b/gold/testsuite/gdb_index_test_3.sh
index dd6ce7e..bd1500b 100755
--- a/gold/testsuite/gdb_index_test_3.sh
+++ b/gold/testsuite/gdb_index_test_3.sh
@@ -41,9 +41,9 @@ check $STDOUT "^Version [45]"
# Look for the symbols we know should be in the symbol table.
-check $STDOUT "^\[ *[0-9]*\] main: "
-check $STDOUT "^\[ *[0-9]*\] check_int: "
-check $STDOUT "^\[ *[0-9]*\] j: "
-check $STDOUT "^\[ *[0-9]*\] int: "
+check $STDOUT "^\[ *[0-9]*\] main:"
+check $STDOUT "^\[ *[0-9]*\] check_int:"
+check $STDOUT "^\[ *[0-9]*\] j:"
+check $STDOUT "^\[ *[0-9]*\] int:"
exit 0
diff --git a/gold/testsuite/gdb_index_test_4.sh b/gold/testsuite/gdb_index_test_4.sh
new file mode 100755
index 0000000..44c8a9a
--- /dev/null
+++ b/gold/testsuite/gdb_index_test_4.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# gdb_index_test_4.sh -- a test case for the --gdb-index option.
+
+# Copyright 2012 Free Software Foundation, Inc.
+# Written by Cary Coutant <ccoutant@google.com>.
+
+# This file is part of gold.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+exec ${srcdir}/gdb_index_test_comm.sh gdb_index_test_4.stdout
diff --git a/gold/testsuite/gdb_index_test_comm.sh b/gold/testsuite/gdb_index_test_comm.sh
new file mode 100755
index 0000000..7100329
--- /dev/null
+++ b/gold/testsuite/gdb_index_test_comm.sh
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+# gdb_index_test_comm.sh -- common code for --gdb-index tests.
+
+# Copyright 2012 Free Software Foundation, Inc.
+# Written by Cary Coutant <ccoutant@google.com>.
+
+# This file is part of gold.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+check()
+{
+ if ! grep -q "$2" "$1"
+ then
+ echo "Did not find expected output:"
+ echo " $2"
+ echo ""
+ echo "Actual error output below:"
+ cat "$1"
+ exit 1
+ fi
+}
+
+STDOUT="$1"
+
+check $STDOUT "^Version [45]"
+
+# Look for the symbols we know should be in the symbol table.
+
+check $STDOUT "^\[ *[0-9]*\] (anonymous namespace):"
+check $STDOUT "^\[ *[0-9]*\] (anonymous namespace)::c1_count:"
+check $STDOUT "^\[ *[0-9]*\] (anonymous namespace)::c2_count:"
+check $STDOUT "^\[ *[0-9]*\] bool:"
+check $STDOUT "^\[ *[0-9]*\] check<one::c1>:"
+check $STDOUT "^\[ *[0-9]*\] check<two::c2<double> >:"
+check $STDOUT "^\[ *[0-9]*\] check<two::c2<int> >:"
+# check $STDOUT "^\[ *[0-9]*\] check<two::c2<int const\*> >:"
+check $STDOUT "^\[ *[0-9]*\] double:"
+check $STDOUT "^\[ *[0-9]*\] F_A:"
+check $STDOUT "^\[ *[0-9]*\] F_B:"
+check $STDOUT "^\[ *[0-9]*\] F_C:"
+check $STDOUT "^\[ *[0-9]*\] int:"
+check $STDOUT "^\[ *[0-9]*\] main:"
+check $STDOUT "^\[ *[0-9]*\] one:"
+check $STDOUT "^\[ *[0-9]*\] one::c1:"
+check $STDOUT "^\[ *[0-9]*\] one::c1::~c1:"
+check $STDOUT "^\[ *[0-9]*\] one::c1::c1:"
+check $STDOUT "^\[ *[0-9]*\] one::c1::val:"
+check $STDOUT "^\[ *[0-9]*\] one::c1v:"
+check $STDOUT "^\[ *[0-9]*\] one::G_A:"
+check $STDOUT "^\[ *[0-9]*\] one::G_B:"
+check $STDOUT "^\[ *[0-9]*\] one::G_B:"
+check $STDOUT "^\[ *[0-9]*\] two:"
+check $STDOUT "^\[ *[0-9]*\] two::c2<double>::~c2:"
+check $STDOUT "^\[ *[0-9]*\] two::c2<double>::c2:"
+check $STDOUT "^\[ *[0-9]*\] two::c2<double>::val:"
+check $STDOUT "^\[ *[0-9]*\] two::c2<double>:"
+check $STDOUT "^\[ *[0-9]*\] two::c2<int const\*>:"
+check $STDOUT "^\[ *[0-9]*\] two::c2<int const\*>::~c2:"
+check $STDOUT "^\[ *[0-9]*\] two::c2<int const\*>::c2:"
+check $STDOUT "^\[ *[0-9]*\] two::c2<int const\*>::val:"
+check $STDOUT "^\[ *[0-9]*\] two::c2<int>::~c2:"
+check $STDOUT "^\[ *[0-9]*\] two::c2<int>::c2:"
+check $STDOUT "^\[ *[0-9]*\] two::c2<int>::val:"
+check $STDOUT "^\[ *[0-9]*\] two::c2<int>:"
+check $STDOUT "^\[ *[0-9]*\] two::c2v1:"
+check $STDOUT "^\[ *[0-9]*\] two::c2v2:"
+check $STDOUT "^\[ *[0-9]*\] anonymous_union_var:"
+
+exit 0