* layout.cc (Layout::make_output_section): Mark .tdata section
	as RELRO.
	* testsuite/relro_test.cc: Add a TLS variable.
This commit is contained in:
Cary Coutant
2012-05-14 17:35:43 +00:00
parent e7e0cddfb0
commit 1007b5031a
3 changed files with 13 additions and 1 deletions

View File

@@ -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)
{