diff options
author | Dmitriy Ivanov <dimitry@google.com> | 2014-12-01 13:37:21 -0800 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2014-12-01 13:37:38 -0800 |
commit | fb2578353335091488c8a5a02e8275a7c139f51a (patch) | |
tree | 6f0a4b767aa7377574ec0b164259af8d7aaac149 /gold | |
parent | d8e603148f3cc4a953409f4a5afff9e4ea898830 (diff) | |
download | fsf-binutils-gdb-fb2578353335091488c8a5a02e8275a7c139f51a.zip fsf-binutils-gdb-fb2578353335091488c8a5a02e8275a7c139f51a.tar.gz fsf-binutils-gdb-fb2578353335091488c8a5a02e8275a7c139f51a.tar.bz2 |
Add support for -z global.
gold/
* layout.cc (Layout::finish_dynamic_section): When '-z global'
is specified set DF_1_GLOBAL in DT_FLAGS_1 flags.
* options.h (General_options): New -z option (global).
Diffstat (limited to 'gold')
-rw-r--r-- | gold/ChangeLog | 6 | ||||
-rw-r--r-- | gold/layout.cc | 2 | ||||
-rw-r--r-- | gold/options.h | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index 2daf182..8bd1afc 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2014-12-01 Dimitry Ivanov <dimitry@google.com> + + * layout.cc (Layout::finish_dynamic_section): When '-z global' + is specified set DF_1_GLOBAL in DT_FLAGS_1 flags. + * options.h (General_options): New -z option (global). + 2014-12-01 Cary Coutant <ccoutant@google.com> PR gold/17578 diff --git a/gold/layout.cc b/gold/layout.cc index a0d7c59..0a71a2a 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -4883,6 +4883,8 @@ Layout::finish_dynamic_section(const Input_objects* input_objects, odyn->add_constant(elfcpp::DT_FLAGS, flags); flags = 0; + if (parameters->options().global()) + flags |= elfcpp::DF_1_GLOBAL; if (parameters->options().initfirst()) flags |= elfcpp::DF_1_INITFIRST; if (parameters->options().interpose()) diff --git a/gold/options.h b/gold/options.h index cf3b705..6d827f1 100644 --- a/gold/options.h +++ b/gold/options.h @@ -1272,6 +1272,9 @@ class General_options NULL); DEFINE_bool(execstack, options::DASH_Z, '\0', false, N_("Mark output as requiring executable stack"), NULL); + DEFINE_bool(global, options::DASH_Z, '\0', false, + N_("Make symbols in DSO available for subsequently loaded " + "objects"), NULL); DEFINE_bool(initfirst, options::DASH_Z, '\0', false, N_("Mark DSO to be initialized first at runtime"), NULL); |