diff options
author | Ian Lance Taylor <ian@airs.com> | 2010-03-24 18:12:48 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2010-03-24 18:12:48 +0000 |
commit | 4ebf39dbf440f80e8d8b507d9ab2949d0209ae5a (patch) | |
tree | 4b035332c1334f62961b816e47cd9be9f92e6173 /gold/testsuite | |
parent | 4f608e793d887d7e4d2677c6362180feff3c977e (diff) | |
download | gdb-4ebf39dbf440f80e8d8b507d9ab2949d0209ae5a.zip gdb-4ebf39dbf440f80e8d8b507d9ab2949d0209ae5a.tar.gz gdb-4ebf39dbf440f80e8d8b507d9ab2949d0209ae5a.tar.bz2 |
* testsuite/script_test_3.t: Add a TLS segment.
* testsuite/Makefile.am (check_PROGRAMS): Add
tls_phdrs_script_test.
(tls_phdrs_script_test_SOURCES): Define.
(tls_phdrs_script_test_DEPENDENCIES): Define.
(tls_phdrs_script_test_LDFLAGS): Define.
(tls_phdrs_script_test_LDADD): Define.
* testsuite/Makefile.in: Rebuild.
Diffstat (limited to 'gold/testsuite')
-rw-r--r-- | gold/testsuite/Makefile.am | 6 | ||||
-rw-r--r-- | gold/testsuite/Makefile.in | 34 | ||||
-rw-r--r-- | gold/testsuite/script_test_3.t | 5 |
3 files changed, 36 insertions, 9 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am index cad75fb..b4f97e9 100644 --- a/gold/testsuite/Makefile.am +++ b/gold/testsuite/Makefile.am @@ -1086,6 +1086,12 @@ script_test_3: basic_test.o gcctestdir/ld script_test_3.t script_test_3.stdout: script_test_3 $(TEST_READELF) -SlW script_test_3 > script_test_3.stdout +check_PROGRAMS += tls_phdrs_script_test +tls_phdrs_script_test_SOURCES = $(tls_test_SOURCES) +tls_phdrs_script_test_DEPENDENCIES = $(tls_test_DEPENDENCIES) $(srcdir)/script_test_3.t +tls_phdrs_script_test_LDFLAGS = $(tls_test_LDFLAGS) -T $(srcdir)/script_test_3.t +tls_phdrs_script_test_LDADD = $(tls_test_LDADD) + check_SCRIPTS += script_test_4.sh check_DATA += script_test_4.stdout MOSTLYCLEANFILES += script_test_4 diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in index d69aa96..86d7a5d 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_phdrs_script_test \ @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 @@ -461,6 +462,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_phdrs_script_test$(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) @@ -798,6 +800,19 @@ am__thin_archive_test_2_SOURCES_DIST = thin_archive_main.cc thin_archive_test_2_OBJECTS = $(am_thin_archive_test_2_OBJECTS) thin_archive_test_2_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(thin_archive_test_2_LDFLAGS) $(LDFLAGS) -o $@ +am__tls_phdrs_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_phdrs_script_test_OBJECTS = \ +@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(am__objects_3) +tls_phdrs_script_test_OBJECTS = $(am_tls_phdrs_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_phdrs_script_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(tls_phdrs_script_test_LDFLAGS) $(LDFLAGS) -o $@ am__tls_pic_test_SOURCES_DIST = tls_test_main.cc @GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am_tls_pic_test_OBJECTS = tls_test_main.$(OBJEXT) tls_pic_test_OBJECTS = $(am_tls_pic_test_OBJECTS) @@ -817,15 +832,9 @@ tls_pie_test_DEPENDENCIES = libgoldtest.a ../libgold.a \ $(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 @@ -1161,8 +1170,9 @@ SOURCES = $(libgoldtest_a_SOURCES) basic_pic_test.c basic_pie_test.c \ $(script_test_1_SOURCES) $(script_test_2_SOURCES) \ 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_script_test_SOURCES) $(tls_shared_gd_to_ie_test_SOURCES) \ + $(tls_phdrs_script_test_SOURCES) $(tls_pic_test_SOURCES) \ + tls_pie_pic_test.c tls_pie_test.c $(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) \ @@ -1224,6 +1234,7 @@ DIST_SOURCES = $(libgoldtest_a_SOURCES) basic_pic_test.c \ $(am__searched_file_test_SOURCES_DIST) \ $(am__thin_archive_test_1_SOURCES_DIST) \ $(am__thin_archive_test_2_SOURCES_DIST) \ + $(am__tls_phdrs_script_test_SOURCES_DIST) \ $(am__tls_pic_test_SOURCES_DIST) tls_pie_pic_test.c \ tls_pie_test.c $(am__tls_script_test_SOURCES_DIST) \ $(am__tls_shared_gd_to_ie_test_SOURCES_DIST) \ @@ -1773,6 +1784,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_phdrs_script_test_SOURCES = $(tls_test_SOURCES) +@GCC_TRUE@@NATIVE_LINKER_TRUE@tls_phdrs_script_test_DEPENDENCIES = $(tls_test_DEPENDENCIES) $(srcdir)/script_test_3.t +@GCC_TRUE@@NATIVE_LINKER_TRUE@tls_phdrs_script_test_LDFLAGS = $(tls_test_LDFLAGS) -T $(srcdir)/script_test_3.t +@GCC_TRUE@@NATIVE_LINKER_TRUE@tls_phdrs_script_test_LDADD = $(tls_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 @@ -2067,6 +2082,9 @@ thin_archive_test_1$(EXEEXT): $(thin_archive_test_1_OBJECTS) $(thin_archive_test thin_archive_test_2$(EXEEXT): $(thin_archive_test_2_OBJECTS) $(thin_archive_test_2_DEPENDENCIES) @rm -f thin_archive_test_2$(EXEEXT) $(thin_archive_test_2_LINK) $(thin_archive_test_2_OBJECTS) $(thin_archive_test_2_LDADD) $(LIBS) +tls_phdrs_script_test$(EXEEXT): $(tls_phdrs_script_test_OBJECTS) $(tls_phdrs_script_test_DEPENDENCIES) + @rm -f tls_phdrs_script_test$(EXEEXT) + $(tls_phdrs_script_test_LINK) $(tls_phdrs_script_test_OBJECTS) $(tls_phdrs_script_test_LDADD) $(LIBS) tls_pic_test$(EXEEXT): $(tls_pic_test_OBJECTS) $(tls_pic_test_DEPENDENCIES) @rm -f tls_pic_test$(EXEEXT) $(tls_pic_test_LINK) $(tls_pic_test_OBJECTS) $(tls_pic_test_LDADD) $(LIBS) diff --git a/gold/testsuite/script_test_3.t b/gold/testsuite/script_test_3.t index 9910349..a6a655f 100644 --- a/gold/testsuite/script_test_3.t +++ b/gold/testsuite/script_test_3.t @@ -1,6 +1,6 @@ /* script_test_3.t -- linker script test 3 for gold - Copyright 2008 Free Software Foundation, Inc. + Copyright 2008, 2010 Free Software Foundation, Inc. Written by Ian Lance Taylor <iant@google.com>. This file is part of gold. @@ -32,6 +32,8 @@ SECTIONS . = ALIGN(0x100); .dynamic : { *(.dynamic) } :data :dynamic .data : { *(.data) } :data + .tdata : { *(.tdata*) } :data :tls + .tbss : { *(.tbss*) } :data :tls . += 0x100000; . = ALIGN(0x100); .bss : { *(.bss) } :bss @@ -44,4 +46,5 @@ PHDRS dynamic PT_DYNAMIC FLAGS(4); data PT_LOAD; bss PT_LOAD; + tls PT_TLS; } |