From: Ian Lance Taylor Date: Sat, 18 Jun 2011 22:34:24 +0000 (+0000) Subject: * layout.cc (Layout::finish_dynamic_section): Don't create X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0d212c3a03ea54828ee620dcdb74294af2f43504;p=binutils-gdb.git * layout.cc (Layout::finish_dynamic_section): Don't create DT_FLAGS entry if not needed. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index e4c6287593f..3b79d95e05c 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2011-06-18 Ian Lance Taylor + + * layout.cc (Layout::finish_dynamic_section): Don't create + DT_FLAGS entry if not needed. + 2011-06-18 Ian Lance Taylor PR gold/12745 diff --git a/gold/layout.cc b/gold/layout.cc index a3e60d52d18..f74c626a745 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -4162,7 +4162,8 @@ Layout::finish_dynamic_section(const Input_objects* input_objects, } if (parameters->options().now()) flags |= elfcpp::DF_BIND_NOW; - odyn->add_constant(elfcpp::DT_FLAGS, flags); + if (flags != 0) + odyn->add_constant(elfcpp::DT_FLAGS, flags); flags = 0; if (parameters->options().initfirst()) @@ -4187,7 +4188,7 @@ Layout::finish_dynamic_section(const Input_objects* input_objects, flags |= elfcpp::DF_1_ORIGIN; if (parameters->options().now()) flags |= elfcpp::DF_1_NOW; - if (flags) + if (flags != 0) odyn->add_constant(elfcpp::DT_FLAGS_1, flags); }