summaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2011-07-03 04:46:56 +0000
committerIan Lance Taylor <ian@airs.com>2011-07-03 04:46:56 +0000
commit9fed464bcae6a9bfa53b764ca0e47af9460151e8 (patch)
treea4f7c5ecb820b6e3e403ecc365dbadb1730212e2 /gold/layout.cc
parent0b0f68f194286d5e70d3b7ab8b6b2379b05337a3 (diff)
downloadbinutils-redhat-9fed464bcae6a9bfa53b764ca0e47af9460151e8.tar.gz
PR gold/12957
* options.h (class General_options): Add -f and -F. * options.cc (General_options::finalize): Fatal error if -f/-F are used without -shared. * layout.cc (Layout::finish_dynamic_section): Implement -f/-F.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index 11dbbef6e8..e6fd7e5114 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -4218,8 +4218,18 @@ Layout::finish_dynamic_section(const Input_objects* input_objects,
}
}
- // Add a DT_FLAGS entry. We add it even if no flags are set so that
- // post-link tools can easily modify these flags if desired.
+ if (parameters->options().filter() != NULL)
+ odyn->add_string(elfcpp::DT_FILTER, parameters->options().filter());
+ if (parameters->options().any_auxiliary())
+ {
+ for (options::String_set::const_iterator p =
+ parameters->options().auxiliary_begin();
+ p != parameters->options().auxiliary_end();
+ ++p)
+ odyn->add_string(elfcpp::DT_AUXILIARY, *p);
+ }
+
+ // Add a DT_FLAGS entry if necessary.
unsigned int flags = 0;
if (have_textrel)
{