diff options
Diffstat (limited to 'gold/layout.cc')
-rw-r--r-- | gold/layout.cc | 6 |
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); } |