This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
gold patch committed: Add test for PIE TLS
- From: Ian Lance Taylor <iant at google dot com>
- To: binutils at sourceware dot org
- Date: Wed, 10 Feb 2010 14:13:49 -0800
- Subject: gold patch committed: Add test for PIE TLS
I committed this gold patch to test using PIE with TLS, since some
different relocations are involved.
Ian
2010-02-10 Ian Lance Taylor <iant@google.com>
* testsuite/Makefile.am (check_PROGRAMS): Add tls_pie_test.
(tls_test_main_pie.o, tls_test_pie.o): New targets.
(tls_test_file2_pie.o, tls_test_c_pie.o, tls_pie_test): Likewise.
* testsuite/Makefile.in: Rebuild.
Index: testsuite/Makefile.am
===================================================================
RCS file: /cvs/src/src/gold/testsuite/Makefile.am,v
retrieving revision 1.118
diff -u -r1.118 Makefile.am
--- testsuite/Makefile.am 12 Jan 2010 19:12:40 -0000 1.118
+++ testsuite/Makefile.am 10 Feb 2010 22:06:35 -0000
@@ -588,6 +588,7 @@
check_PROGRAMS += tls_test
check_PROGRAMS += tls_pic_test
+check_PROGRAMS += tls_pie_test
check_PROGRAMS += tls_shared_test
check_PROGRAMS += tls_shared_ie_test
check_PROGRAMS += tls_shared_gd_to_ie_test
@@ -625,6 +626,18 @@
tls_pic_test_LDADD = tls_test_pic.o tls_test_file2_pic.o tls_test_c_pic.o \
-lpthread
+tls_test_main_pie.o: tls_test_main.cc tls_test.h
+ $(CXXCOMPILE) -c -fpie -o $@ $<
+tls_test_pie.o: tls_test.cc tls_test.h
+ $(CXXCOMPILE) -c -fpie -o $@ $<
+tls_test_file2_pie.o: tls_test_file2.cc tls_test.h
+ $(CXXCOMPILE) -c -fpie -o $@ $<
+tls_test_c_pie.o: tls_test_c.c
+ $(COMPILE) -c -fpic $(TLS_TEST_C_CFLAGS) -o $@ $<
+tls_pie_test: tls_test_main_pie.o tls_test_pie.o tls_test_file2_pie.o \
+ tls_test_c_pie.o gcctestdir/ld
+ $(CXXLINK) -Bgcctestdir/ -pie tls_test_main_pie.o tls_test_pie.o tls_test_file2_pie.o tls_test_c_pie.o -lpthread
+
tls_shared_test_SOURCES = tls_test_main.cc
tls_shared_test_DEPENDENCIES = gcctestdir/ld tls_test_shared.so
tls_shared_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.