aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/Makefile.am
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@gmail.com>2016-12-05 10:41:09 -0800
committerCary Coutant <ccoutant@gmail.com>2016-12-05 10:41:09 -0800
commit82d93790a85300d8452450b6d43efb6b15b53788 (patch)
tree85c425898bd936ae050993bca517a206c1c2e470 /gold/testsuite/Makefile.am
parentf49547a604b4dd2c75e3636d4a422d52edc4fa6c (diff)
downloadgdb-82d93790a85300d8452450b6d43efb6b15b53788.zip
gdb-82d93790a85300d8452450b6d43efb6b15b53788.tar.gz
gdb-82d93790a85300d8452450b6d43efb6b15b53788.tar.bz2
Fix problem where absolute local symbols are omitted when output has many sections.
2016-12-05 Cary Coutant <ccoutant@gmail.com> Tristan Gingold <gingold@adacore.com> gold/ * object.cc (Sized_relobj_file::do_count_local_symbols): Check is_ordinary before using shndx. * testsuite/Makefile.am (file_in_many_sections_test.sh): New test case. * testsuite/Makefile.in: Regenerate. * testsuite/file_in_many_sections.c: New source file. * testsuite/file_in_many_sections_test.sh: New script.
Diffstat (limited to 'gold/testsuite/Makefile.am')
-rw-r--r--gold/testsuite/Makefile.am10
1 files changed, 10 insertions, 0 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index 1575aa3..17f45d6 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -1339,6 +1339,16 @@ many_sections_r_test.o: many_sections_test.o gcctestdir/ld
many_sections_r_test: many_sections_r_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ many_sections_r_test.o $(LIBS)
+check_SCRIPTS += file_in_many_sections_test.sh
+check_DATA += file_in_many_sections.stdout
+MOSTLYCLEANFILES += file_in_many_sections
+file_in_many_sections.o: file_in_many_sections.c many_sections_define.h
+ $(COMPILE) -c -fdata-sections -o $@ $(srcdir)/file_in_many_sections.c
+file_in_many_sections: file_in_many_sections.o gcctestdir/ld
+ $(LINK) -Bgcctestdir/ file_in_many_sections.o -Wl,--gc-sections
+file_in_many_sections.stdout: file_in_many_sections
+ $(TEST_READELF) -s $< > $@
+
check_PROGRAMS += initpri1
initpri1_SOURCES = initpri1.c
initpri1_DEPENDENCIES = gcctestdir/ld