aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite/relro_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/testsuite/relro_test.cc')
-rw-r--r--gold/testsuite/relro_test.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/gold/testsuite/relro_test.cc b/gold/testsuite/relro_test.cc
index d741022..795ad39 100644
--- a/gold/testsuite/relro_test.cc
+++ b/gold/testsuite/relro_test.cc
@@ -45,6 +45,9 @@ int* const p1 __attribute__ ((aligned(64))) = &i1;
// P2 is a local relro variable.
int* const p2 __attribute__ ((aligned(64))) = &i2;
+// Add a TLS variable to make sure -z relro works correctly with TLS.
+__thread int i3 = 1;
+
// Test symbol addresses.
bool
@@ -76,6 +79,7 @@ t1()
assert(i1page != p2page);
assert(i2page != p1page);
assert(i2page != p2page);
+ assert(i3 == 1);
return true;
}