aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gold/ChangeLog5
-rw-r--r--gold/layout.cc5
2 files changed, 8 insertions, 2 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index e4c6287..3b79d95 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,5 +1,10 @@
2011-06-18 Ian Lance Taylor <iant@google.com>
+ * layout.cc (Layout::finish_dynamic_section): Don't create
+ DT_FLAGS entry if not needed.
+
+2011-06-18 Ian Lance Taylor <iant@google.com>
+
PR gold/12745
* layout.cc (Layout::layout_eh_frame): Correct handling of
writable .eh_frame section.
diff --git a/gold/layout.cc b/gold/layout.cc
index a3e60d5..f74c626 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);
}