aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-12-07 23:26:51 +0000
committerIan Lance Taylor <iant@google.com>2007-12-07 23:26:51 +0000
commit6a41d30bc2a8440b3f0085c77d1b5f4ad3f8bd7b (patch)
tree075ae0eddfb2c978819dc2d9d2306fbf4dff3098 /gold/layout.cc
parent2e53a11d03618a7997d74c938ca6cdf1c05bece2 (diff)
downloadgdb-6a41d30bc2a8440b3f0085c77d1b5f4ad3f8bd7b.zip
gdb-6a41d30bc2a8440b3f0085c77d1b5f4ad3f8bd7b.tar.gz
gdb-6a41d30bc2a8440b3f0085c77d1b5f4ad3f8bd7b.tar.bz2
From Cary Coutant: Fix x86_64 TLS. Also set DT_TEXTREL as well as
DF_TEXTREL.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index f5a1f67..0a08f71 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -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);
}