From Cary Coutant: Fix x86_64 TLS. Also set DT_TEXTREL as well as

DF_TEXTREL.
This commit is contained in:
Ian Lance Taylor
2007-12-07 23:26:51 +00:00
parent 2e53a11d03
commit 6a41d30bc2
2 changed files with 24 additions and 18 deletions

View File

@@ -1728,7 +1728,11 @@ Layout::finish_dynamic_section(const Input_objects* input_objects,
// post-link tools can easily modify these flags if desired.
unsigned int flags = 0;
if (have_textrel)
flags |= elfcpp::DF_TEXTREL;
{
// Add a DT_TEXTREL for compatibility with older loaders.
odyn->add_constant(elfcpp::DT_TEXTREL, 0);
flags |= elfcpp::DF_TEXTREL;
}
odyn->add_constant(elfcpp::DT_FLAGS, flags);
}