aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2012-05-14 17:35:43 +0000
committerCary Coutant <ccoutant@google.com>2012-05-14 17:35:43 +0000
commit1007b5031a2719a1a40737e501e808df12ed7e02 (patch)
treed40c3cb4338ec2da627f48d7562c50df564d22b9 /gold/layout.cc
parente7e0cddfb0d4c4823cc7ed48c727e12f0e11a600 (diff)
downloadgdb-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/layout.cc')
-rw-r--r--gold/layout.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index b58f9d2..0ac0fbf 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -1430,7 +1430,9 @@ Layout::make_output_section(const char* name, elfcpp::Elf_Word type,
{
if (type == elfcpp::SHT_PROGBITS)
{
- if (strcmp(name, ".data.rel.ro") == 0)
+ if ((flags & elfcpp::SHF_TLS) != 0)
+ is_relro = true;
+ else if (strcmp(name, ".data.rel.ro") == 0)
is_relro = true;
else if (strcmp(name, ".data.rel.ro.local") == 0)
{