diff options
author | Chris Demetriou <cgd@google.com> | 2008-09-12 05:42:29 +0000 |
---|---|---|
committer | Chris Demetriou <cgd@google.com> | 2008-09-12 05:42:29 +0000 |
commit | 7be8330a59e4c55791360237af8cf2b070d0f45c (patch) | |
tree | d0f813a29a7919f42c2e65c16e4ddcd3880a9449 /gold/layout.cc | |
parent | d140ac6b030299f1c19722a6f5cebda6e5f688b8 (diff) | |
download | gdb-7be8330a59e4c55791360237af8cf2b070d0f45c.zip gdb-7be8330a59e4c55791360237af8cf2b070d0f45c.tar.gz gdb-7be8330a59e4c55791360237af8cf2b070d0f45c.tar.bz2 |
2008-09-11 Chris Demetriou <cgd@google.com>
* options.h (origin): New -z option.
* layout.cc (Layout:finish_dynamic_section): If "-z origin"
is specified, set DF_ORIGIN in DT_FLAGS and set DF_1_ORIGIN
in DT_FLAGS_1.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r-- | gold/layout.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gold/layout.cc b/gold/layout.cc index 99819d6..ec9654e 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -2753,6 +2753,8 @@ Layout::finish_dynamic_section(const Input_objects* input_objects, } if (parameters->options().shared() && this->has_static_tls()) flags |= elfcpp::DF_STATIC_TLS; + if (parameters->options().origin()) + flags |= elfcpp::DF_ORIGIN; odyn->add_constant(elfcpp::DT_FLAGS, flags); flags = 0; @@ -2774,6 +2776,8 @@ Layout::finish_dynamic_section(const Input_objects* input_objects, flags &= ~(elfcpp::DF_1_INITFIRST | elfcpp::DF_1_NODELETE | elfcpp::DF_1_NOOPEN); + if (parameters->options().origin()) + flags |= elfcpp::DF_1_ORIGIN; if (flags) odyn->add_constant(elfcpp::DT_FLAGS_1, flags); } |