aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2010-03-23 21:06:10 +0000
committerIan Lance Taylor <ian@airs.com>2010-03-23 21:06:10 +0000
commit6c93b22ce4b4f83c550a489fd547de3f1468e1e1 (patch)
tree195b08709a6c8df68e13c67abeaafcc5402ec65d /gold/testsuite
parentb9a881c2d200e0e2920f9d307817400f2bdbefac (diff)
downloadgdb-6c93b22ce4b4f83c550a489fd547de3f1468e1e1.zip
gdb-6c93b22ce4b4f83c550a489fd547de3f1468e1e1.tar.gz
gdb-6c93b22ce4b4f83c550a489fd547de3f1468e1e1.tar.bz2
* script-sections.cc (class Orphan_section_placement): Define
PLACE_TLS and PLACE_TLS_BSS. (Orphan_section_placement::Orphan_section_placement): Initialize new places. (Orphan_section_placement::find_place): Handle SHF_TLS sections. * testsuite/Makefile.am (check_PROGRAMS): Add tls_script_test. (tls_script_test_SOURCES): Define. (tls_script_test_DEPENDENCIES): Define. (tls_script_test_LDFLAGS): Define. (tls_script_test_LDADD): Define. * testsuite/Makefile.in: Rebuild.
Diffstat (limited to 'gold/testsuite')
-rw-r--r--gold/testsuite/Makefile.am6
-rw-r--r--gold/testsuite/Makefile.in41
2 files changed, 35 insertions, 12 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index b115283..cad75fb 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -1094,6 +1094,12 @@ script_test_4: basic_test.o gcctestdir/ld $(srcdir)/script_test_4.t
script_test_4.stdout: script_test_4
$(TEST_READELF) -SlW script_test_4 > script_test_4.stdout
+check_PROGRAMS += tls_script_test
+tls_script_test_SOURCES = $(tls_test_SOURCES)
+tls_script_test_DEPENDENCIES = $(tls_test_DEPENDENCIES) $(srcdir)/script_test_4.t
+tls_script_test_LDFLAGS = $(tls_test_LDFLAGS) -T $(srcdir)/script_test_4.t
+tls_script_test_LDADD = $(tls_test_LDADD)
+
check_SCRIPTS += script_test_5.sh
check_DATA += script_test_5.stdout
MOSTLYCLEANFILES += script_test_5
diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in
index 061c627..d69aa96 100644
--- a/gold/testsuite/Makefile.in
+++ b/gold/testsuite/Makefile.in
@@ -223,6 +223,7 @@ check_PROGRAMS = object_unittest$(EXEEXT) binary_unittest$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_script_test script_test_1 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_2 justsyms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ binary_test script_test_3 \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ tls_script_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ thin_archive_test_1 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ thin_archive_test_2
@GCC_FALSE@script_test_1_DEPENDENCIES =
@@ -460,6 +461,7 @@ libgoldtest_a_OBJECTS = $(am_libgoldtest_a_OBJECTS)
@GCC_TRUE@@NATIVE_LINKER_TRUE@ justsyms$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ binary_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_3$(EXEEXT) \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ tls_script_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ thin_archive_test_1$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ thin_archive_test_2$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__EXEEXT_16 = plugin_test_1$(EXEEXT) \
@@ -813,6 +815,19 @@ tls_pie_test_LDADD = $(LDADD)
tls_pie_test_DEPENDENCIES = libgoldtest.a ../libgold.a \
../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am__tls_script_test_SOURCES_DIST = tls_test.cc tls_test_file2.cc \
+ tls_test_main.cc tls_test.h
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__objects_3 = \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test.$(OBJEXT) \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test_file2.$(OBJEXT) \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test_main.$(OBJEXT)
+@GCC_TRUE@@NATIVE_LINKER_TRUE@am_tls_script_test_OBJECTS = \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(am__objects_3)
+tls_script_test_OBJECTS = $(am_tls_script_test_OBJECTS)
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__DEPENDENCIES_2 = \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test_c.o
+tls_script_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+ $(tls_script_test_LDFLAGS) $(LDFLAGS) -o $@
am__tls_shared_gd_to_ie_test_SOURCES_DIST = tls_test_main.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am_tls_shared_gd_to_ie_test_OBJECTS = tls_test_main.$(OBJEXT)
tls_shared_gd_to_ie_test_OBJECTS = \
@@ -847,10 +862,10 @@ tls_shared_test_OBJECTS = $(am_tls_shared_test_OBJECTS)
tls_shared_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(tls_shared_test_LDFLAGS) $(LDFLAGS) -o $@
am__tls_static_pic_test_SOURCES_DIST = tls_test_main.cc
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__objects_3 = tls_test_main.$(OBJEXT)
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@am_tls_static_pic_test_OBJECTS = $(am__objects_3)
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__objects_4 = tls_test_main.$(OBJEXT)
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@am_tls_static_pic_test_OBJECTS = $(am__objects_4)
tls_static_pic_test_OBJECTS = $(am_tls_static_pic_test_OBJECTS)
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__DEPENDENCIES_2 = \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__DEPENDENCIES_3 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test_pic.o \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test_file2_pic.o \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test_c_pic.o
@@ -858,14 +873,8 @@ tls_static_pic_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(tls_static_pic_test_LDFLAGS) $(LDFLAGS) -o $@
am__tls_static_test_SOURCES_DIST = tls_test.cc tls_test_file2.cc \
tls_test_main.cc tls_test.h
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__objects_4 = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test.$(OBJEXT) \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test_file2.$(OBJEXT) \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test_main.$(OBJEXT)
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@am_tls_static_test_OBJECTS = $(am__objects_4)
+@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@am_tls_static_test_OBJECTS = $(am__objects_3)
tls_static_test_OBJECTS = $(am_tls_static_test_OBJECTS)
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__DEPENDENCIES_3 = \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test_c.o
tls_static_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(tls_static_test_LDFLAGS) $(LDFLAGS) -o $@
am__tls_test_SOURCES_DIST = tls_test.cc tls_test_file2.cc \
@@ -1153,7 +1162,7 @@ SOURCES = $(libgoldtest_a_SOURCES) basic_pic_test.c basic_pie_test.c \
script_test_3.c $(searched_file_test_SOURCES) \
$(thin_archive_test_1_SOURCES) $(thin_archive_test_2_SOURCES) \
$(tls_pic_test_SOURCES) tls_pie_pic_test.c tls_pie_test.c \
- $(tls_shared_gd_to_ie_test_SOURCES) \
+ $(tls_script_test_SOURCES) $(tls_shared_gd_to_ie_test_SOURCES) \
$(tls_shared_gnu2_gd_to_ie_test_SOURCES) \
$(tls_shared_gnu2_test_SOURCES) $(tls_shared_ie_test_SOURCES) \
$(tls_shared_nonpic_test_SOURCES) $(tls_shared_test_SOURCES) \
@@ -1216,7 +1225,8 @@ DIST_SOURCES = $(libgoldtest_a_SOURCES) basic_pic_test.c \
$(am__thin_archive_test_1_SOURCES_DIST) \
$(am__thin_archive_test_2_SOURCES_DIST) \
$(am__tls_pic_test_SOURCES_DIST) tls_pie_pic_test.c \
- tls_pie_test.c $(am__tls_shared_gd_to_ie_test_SOURCES_DIST) \
+ tls_pie_test.c $(am__tls_script_test_SOURCES_DIST) \
+ $(am__tls_shared_gd_to_ie_test_SOURCES_DIST) \
$(am__tls_shared_gnu2_gd_to_ie_test_SOURCES_DIST) \
$(am__tls_shared_gnu2_test_SOURCES_DIST) \
$(am__tls_shared_ie_test_SOURCES_DIST) \
@@ -1763,6 +1773,10 @@ binary_unittest_SOURCES = binary_unittest.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@binary_test_DEPENDENCIES = gcctestdir/ld binary.txt
@GCC_TRUE@@NATIVE_LINKER_TRUE@binary_test_LDFLAGS = -Bgcctestdir/ -Wl,--format,binary,binary.txt,--format,elf
@GCC_TRUE@@NATIVE_LINKER_TRUE@binary_test_LDADD =
+@GCC_TRUE@@NATIVE_LINKER_TRUE@tls_script_test_SOURCES = $(tls_test_SOURCES)
+@GCC_TRUE@@NATIVE_LINKER_TRUE@tls_script_test_DEPENDENCIES = $(tls_test_DEPENDENCIES) $(srcdir)/script_test_4.t
+@GCC_TRUE@@NATIVE_LINKER_TRUE@tls_script_test_LDFLAGS = $(tls_test_LDFLAGS) -T $(srcdir)/script_test_4.t
+@GCC_TRUE@@NATIVE_LINKER_TRUE@tls_script_test_LDADD = $(tls_test_LDADD)
@GCC_TRUE@@NATIVE_LINKER_TRUE@thin_archive_test_1_SOURCES = thin_archive_main.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@thin_archive_test_1_DEPENDENCIES = gcctestdir/ld libthin1.a alt/libthin2.a
@GCC_TRUE@@NATIVE_LINKER_TRUE@thin_archive_test_1_LDFLAGS = -Bgcctestdir/ -Lalt
@@ -2074,6 +2088,9 @@ tls_pic_test$(EXEEXT): $(tls_pic_test_OBJECTS) $(tls_pic_test_DEPENDENCIES)
@TLS_FALSE@tls_pie_test$(EXEEXT): $(tls_pie_test_OBJECTS) $(tls_pie_test_DEPENDENCIES)
@TLS_FALSE@ @rm -f tls_pie_test$(EXEEXT)
@TLS_FALSE@ $(LINK) $(tls_pie_test_OBJECTS) $(tls_pie_test_LDADD) $(LIBS)
+tls_script_test$(EXEEXT): $(tls_script_test_OBJECTS) $(tls_script_test_DEPENDENCIES)
+ @rm -f tls_script_test$(EXEEXT)
+ $(tls_script_test_LINK) $(tls_script_test_OBJECTS) $(tls_script_test_LDADD) $(LIBS)
tls_shared_gd_to_ie_test$(EXEEXT): $(tls_shared_gd_to_ie_test_OBJECTS) $(tls_shared_gd_to_ie_test_DEPENDENCIES)
@rm -f tls_shared_gd_to_ie_test$(EXEEXT)
$(tls_shared_gd_to_ie_test_LINK) $(tls_shared_gd_to_ie_test_OBJECTS) $(tls_shared_gd_to_ie_test_LDADD) $(LIBS)