aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite
diff options
context:
space:
mode:
authorRafael Ávila de Espíndola <rafael.espindola@gmail.com>2015-04-27 14:33:02 -0400
committerRafael Ávila de Espíndola <rafael.espindola@gmail.com>2015-04-27 14:35:17 -0400
commitcfbf0e3c5b637d66b2b1aeadecae9c187b825b2f (patch)
treebe86234359ffb2555ab01fd46b40e3d82dee18c6 /gold/testsuite
parent4fff86c517abb5ba454befe0ec0f284f720dde00 (diff)
downloadgdb-cfbf0e3c5b637d66b2b1aeadecae9c187b825b2f.zip
gdb-cfbf0e3c5b637d66b2b1aeadecae9c187b825b2f.tar.gz
gdb-cfbf0e3c5b637d66b2b1aeadecae9c187b825b2f.tar.bz2
If a range is missing, assume the input address is mapped.
When Output_section::is_input_address_mapped is called we have entries for all dropped ranges, but not for all ranges.
Diffstat (limited to 'gold/testsuite')
-rw-r--r--gold/testsuite/Makefile.am8
-rw-r--r--gold/testsuite/Makefile.in34
-rw-r--r--gold/testsuite/eh_test_a.cc4
-rw-r--r--gold/testsuite/eh_test_b.cc23
4 files changed, 64 insertions, 5 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index e47174d..e2390eb 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -375,6 +375,14 @@ basic_test.o: basic_test.cc
basic_test: basic_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ basic_test.o
+check_PROGRAMS += eh_test
+eh_test_a.o: eh_test_a.cc
+ $(CXXCOMPILE) -O0 -c -o $@ $<
+eh_test_b.o: eh_test_b.cc
+ $(CXXCOMPILE) -O0 -c -o $@ $<
+eh_test: eh_test_a.o eh_test_b.o gcctestdir/ld
+ $(CXXLINK_S) -Bgcctestdir/ eh_test_a.o eh_test_b.o
+
if HAVE_STATIC
check_PROGRAMS += basic_static_test
basic_static_test: basic_test.o gcctestdir/ld
diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in
index 4d7a54f..fe8da13 100644
--- a/gold/testsuite/Makefile.in
+++ b/gold/testsuite/Makefile.in
@@ -123,7 +123,8 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ libweak_undef_2.a
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_5 = icf_virtual_function_folding_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ large_symbol_alignment \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_test basic_pic_test
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_test basic_pic_test \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ eh_test
@GCC_FALSE@large_symbol_alignment_DEPENDENCIES =
@NATIVE_LINKER_FALSE@large_symbol_alignment_DEPENDENCIES =
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@am__append_6 = basic_static_test \
@@ -824,7 +825,8 @@ libgoldtest_a_OBJECTS = $(am_libgoldtest_a_OBJECTS)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_2 = icf_virtual_function_folding_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ large_symbol_alignment$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_test$(EXEEXT) \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_pic_test$(EXEEXT)
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_pic_test$(EXEEXT) \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ eh_test$(EXEEXT)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_3 = basic_static_test$(EXEEXT) \
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@ basic_static_pic_test$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_4 = basic_pie_test$(EXEEXT) \
@@ -1081,6 +1083,13 @@ discard_locals_test_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
dynamic_list_2_OBJECTS = $(am_dynamic_list_2_OBJECTS)
dynamic_list_2_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(dynamic_list_2_LDFLAGS) $(LDFLAGS) -o $@
+eh_test_SOURCES = eh_test.c
+eh_test_OBJECTS = eh_test.$(OBJEXT)
+eh_test_LDADD = $(LDADD)
+eh_test_DEPENDENCIES = libgoldtest.a ../libgold.a \
+ ../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_1)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_ehdr_start_test_1_OBJECTS = ehdr_start_test_1-ehdr_start_test.$(OBJEXT)
ehdr_start_test_1_OBJECTS = $(am_ehdr_start_test_1_OBJECTS)
ehdr_start_test_1_LINK = $(CXXLD) $(ehdr_start_test_1_CXXFLAGS) \
@@ -1991,9 +2000,9 @@ SOURCES = $(libgoldtest_a_SOURCES) basic_pic_test.c basic_pie_test.c \
$(common_test_1_SOURCES) $(common_test_2_SOURCES) \
$(constructor_static_test_SOURCES) $(constructor_test_SOURCES) \
$(copy_test_SOURCES) $(discard_locals_test_SOURCES) \
- $(dynamic_list_2_SOURCES) $(ehdr_start_test_1_SOURCES) \
- $(ehdr_start_test_2_SOURCES) $(ehdr_start_test_3_SOURCES) \
- $(ehdr_start_test_5_SOURCES) \
+ $(dynamic_list_2_SOURCES) eh_test.c \
+ $(ehdr_start_test_1_SOURCES) $(ehdr_start_test_2_SOURCES) \
+ $(ehdr_start_test_3_SOURCES) $(ehdr_start_test_5_SOURCES) \
$(exception_same_shared_test_SOURCES) \
$(exception_separate_shared_12_test_SOURCES) \
$(exception_separate_shared_21_test_SOURCES) \
@@ -2989,6 +2998,12 @@ discard_locals_test$(EXEEXT): $(discard_locals_test_OBJECTS) $(discard_locals_te
dynamic_list_2$(EXEEXT): $(dynamic_list_2_OBJECTS) $(dynamic_list_2_DEPENDENCIES)
@rm -f dynamic_list_2$(EXEEXT)
$(dynamic_list_2_LINK) $(dynamic_list_2_OBJECTS) $(dynamic_list_2_LDADD) $(LIBS)
+@GCC_FALSE@eh_test$(EXEEXT): $(eh_test_OBJECTS) $(eh_test_DEPENDENCIES)
+@GCC_FALSE@ @rm -f eh_test$(EXEEXT)
+@GCC_FALSE@ $(LINK) $(eh_test_OBJECTS) $(eh_test_LDADD) $(LIBS)
+@NATIVE_LINKER_FALSE@eh_test$(EXEEXT): $(eh_test_OBJECTS) $(eh_test_DEPENDENCIES)
+@NATIVE_LINKER_FALSE@ @rm -f eh_test$(EXEEXT)
+@NATIVE_LINKER_FALSE@ $(LINK) $(eh_test_OBJECTS) $(eh_test_LDADD) $(LIBS)
ehdr_start_test_1$(EXEEXT): $(ehdr_start_test_1_OBJECTS) $(ehdr_start_test_1_DEPENDENCIES)
@rm -f ehdr_start_test_1$(EXEEXT)
$(ehdr_start_test_1_LINK) $(ehdr_start_test_1_OBJECTS) $(ehdr_start_test_1_LDADD) $(LIBS)
@@ -3761,6 +3776,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy_test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/discard_locals_test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynamic_list_2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh_test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ehdr_start_test_1-ehdr_start_test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ehdr_start_test_2-ehdr_start_test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ehdr_start_test_3-ehdr_start_test.Po@am__quote@
@@ -4402,6 +4418,8 @@ basic_test.log: basic_test$(EXEEXT)
@p='basic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
basic_pic_test.log: basic_pic_test$(EXEEXT)
@p='basic_pic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+eh_test.log: eh_test$(EXEEXT)
+ @p='eh_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
basic_static_test.log: basic_static_test$(EXEEXT)
@p='basic_static_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
basic_static_pic_test.log: basic_static_pic_test$(EXEEXT)
@@ -5009,6 +5027,12 @@ uninstall-am:
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@basic_test: basic_test.o gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ basic_test.o
+@GCC_TRUE@@NATIVE_LINKER_TRUE@eh_test_a.o: eh_test_a.cc
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -o $@ $<
+@GCC_TRUE@@NATIVE_LINKER_TRUE@eh_test_b.o: eh_test_b.cc
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -o $@ $<
+@GCC_TRUE@@NATIVE_LINKER_TRUE@eh_test: eh_test_a.o eh_test_b.o gcctestdir/ld
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK_S) -Bgcctestdir/ eh_test_a.o eh_test_b.o
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@basic_static_test: basic_test.o gcctestdir/ld
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -static basic_test.o
diff --git a/gold/testsuite/eh_test_a.cc b/gold/testsuite/eh_test_a.cc
new file mode 100644
index 0000000..ad4bcc2
--- /dev/null
+++ b/gold/testsuite/eh_test_a.cc
@@ -0,0 +1,4 @@
+void
+bar()
+{
+}
diff --git a/gold/testsuite/eh_test_b.cc b/gold/testsuite/eh_test_b.cc
new file mode 100644
index 0000000..50538df
--- /dev/null
+++ b/gold/testsuite/eh_test_b.cc
@@ -0,0 +1,23 @@
+#include <iostream>
+#include <cstdlib>
+
+void
+foo()
+{
+}
+
+int
+main()
+{
+ try
+ {
+ throw(1);
+ }
+ catch(int)
+ {
+ std::cout << "caught" << std::endl;
+ exit(0);
+ }
+ std::cout << "failed" << std::endl;
+ exit(1);
+}