This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gold patch committed: Fix script_test_3 for TLS


On some hosts script_test_3 will get TLS variables linked into the
program.  In order to make that work, we need to create a PT_TLS
segment.  I committed this patch to gold to make that work.

Ian


2010-03-24  Ian Lance Taylor  <iant@google.com>

	* 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.


Index: testsuite/script_test_3.t
===================================================================
RCS file: /cvs/src/src/gold/testsuite/script_test_3.t,v
retrieving revision 1.2
diff -p -u -r1.2 script_test_3.t
--- testsuite/script_test_3.t	12 Feb 2008 00:15:40 -0000	1.2
+++ testsuite/script_test_3.t	24 Mar 2010 18:10:42 -0000
@@ -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;
 }
Index: testsuite/Makefile.am
===================================================================
RCS file: /cvs/src/src/gold/testsuite/Makefile.am,v
retrieving revision 1.127
diff -p -u -r1.127 Makefile.am
--- testsuite/Makefile.am	23 Mar 2010 21:06:10 -0000	1.127
+++ testsuite/Makefile.am	24 Mar 2010 18:10:42 -0000
@@ -1086,6 +1086,12 @@ script_test_3: basic_test.o gcctestdir/l
 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]