aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2011-06-18 22:34:24 +0000
committerIan Lance Taylor <ian@airs.com>2011-06-18 22:34:24 +0000
commit0d212c3a03ea54828ee620dcdb74294af2f43504 (patch)
tree546bd4352b056299068ce8751075f2af3c741ced /gold/layout.cc
parent911a5072375a58fb7fd1394dc913a9b315db22a6 (diff)
downloadgdb-0d212c3a03ea54828ee620dcdb74294af2f43504.zip
gdb-0d212c3a03ea54828ee620dcdb74294af2f43504.tar.gz
gdb-0d212c3a03ea54828ee620dcdb74294af2f43504.tar.bz2
* layout.cc (Layout::finish_dynamic_section): Don't create
DT_FLAGS entry if not needed.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc5
1 files changed, 3 insertions, 2 deletions
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);
}