diff options
author | Cary Coutant <ccoutant@google.com> | 2012-05-14 17:35:43 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2012-05-14 17:35:43 +0000 |
commit | 1007b5031a2719a1a40737e501e808df12ed7e02 (patch) | |
tree | d40c3cb4338ec2da627f48d7562c50df564d22b9 /gold/testsuite | |
parent | e7e0cddfb0d4c4823cc7ed48c727e12f0e11a600 (diff) | |
download | gdb-1007b5031a2719a1a40737e501e808df12ed7e02.zip gdb-1007b5031a2719a1a40737e501e808df12ed7e02.tar.gz gdb-1007b5031a2719a1a40737e501e808df12ed7e02.tar.bz2 |
gold/
* layout.cc (Layout::make_output_section): Mark .tdata section
as RELRO.
* testsuite/relro_test.cc: Add a TLS variable.
Diffstat (limited to 'gold/testsuite')
-rw-r--r-- | gold/testsuite/relro_test.cc | 4 |
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; } |