From: Ian Lance Taylor Date: Mon, 22 Jun 2009 20:23:21 +0000 (+0000) Subject: PR 10141 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e1c74d60518dbc83c562951e89203274e4ff17ce;p=binutils-gdb.git PR 10141 * options.h (class General_options): Add -z lazy and -z now. Sort -z options into alphabetical order. * layout.cc (Layout::finish_dynamic_section): Handle -z now. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index cf4425f6d14..fea0a34d2c4 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,10 @@ +2009-06-22 Ian Lance Taylor + + PR 10141 + * options.h (class General_options): Add -z lazy and -z now. Sort + -z options into alphabetical order. + * layout.cc (Layout::finish_dynamic_section): Handle -z now. + 2009-06-21 Ian Lance Taylor * layout.cc (Layout::make_output_section): Call diff --git a/gold/layout.cc b/gold/layout.cc index c3020cd843b..ae2a5dc8e7d 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -2835,6 +2835,8 @@ Layout::finish_dynamic_section(const Input_objects* input_objects, flags |= elfcpp::DF_STATIC_TLS; if (parameters->options().origin()) flags |= elfcpp::DF_ORIGIN; + if (parameters->options().now()) + flags |= elfcpp::DF_BIND_NOW; odyn->add_constant(elfcpp::DT_FLAGS, flags); flags = 0; @@ -2858,6 +2860,8 @@ Layout::finish_dynamic_section(const Input_objects* input_objects, | elfcpp::DF_1_NOOPEN); if (parameters->options().origin()) flags |= elfcpp::DF_1_ORIGIN; + if (parameters->options().now()) + flags |= elfcpp::DF_1_NOW; if (flags) odyn->add_constant(elfcpp::DT_FLAGS_1, flags); } diff --git a/gold/options.h b/gold/options.h index d4255f1fb62..c31f6b101a4 100644 --- a/gold/options.h +++ b/gold/options.h @@ -896,19 +896,20 @@ class General_options NULL); DEFINE_bool(execstack, options::DASH_Z, '\0', false, N_("Mark output as requiring executable stack"), NULL); - DEFINE_uint64(max_page_size, options::DASH_Z, '\0', 0, - N_("Set maximum page size to SIZE"), N_("SIZE")); - DEFINE_bool(noexecstack, options::DASH_Z, '\0', false, - N_("Mark output as not requiring executable stack"), NULL); DEFINE_bool(initfirst, options::DASH_Z, '\0', false, N_("Mark DSO to be initialized first at runtime"), NULL); DEFINE_bool(interpose, options::DASH_Z, '\0', false, N_("Mark object to interpose all DSOs but executable"), NULL); + DEFINE_bool(lazy, options::DASH_Z, '\0', false, + N_("Mark object for lazy runtime binding (default)"), + NULL); DEFINE_bool(loadfltr, options::DASH_Z, '\0', false, N_("Mark object requiring immediate process"), NULL); + DEFINE_uint64(max_page_size, options::DASH_Z, '\0', 0, + N_("Set maximum page size to SIZE"), N_("SIZE")); DEFINE_bool(nodefaultlib, options::DASH_Z, '\0', false, N_("Mark object not to use default search paths"), NULL); @@ -921,12 +922,17 @@ class General_options DEFINE_bool(nodump, options::DASH_Z, '\0', false, N_("Mark DSO not available to dldump"), NULL); - DEFINE_bool(relro, options::DASH_Z, '\0', false, - N_("Where possible mark variables read-only after relocation"), - N_("Don't mark variables read-only after relocation")); + DEFINE_bool(noexecstack, options::DASH_Z, '\0', false, + N_("Mark output as not requiring executable stack"), NULL); + DEFINE_bool(now, options::DASH_Z, '\0', false, + N_("Mark object for immediate function binding"), + NULL); DEFINE_bool(origin, options::DASH_Z, '\0', false, N_("Mark DSO to indicate that needs immediate $ORIGIN " "processing at runtime"), NULL); + DEFINE_bool(relro, options::DASH_Z, '\0', false, + N_("Where possible mark variables read-only after relocation"), + N_("Don't mark variables read-only after relocation")); public: typedef options::Dir_list Dir_list;