aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-06-23 07:04:10 +0000
committerIan Lance Taylor <ian@airs.com>2009-06-23 07:04:10 +0000
commitf7c8a183e8d2c83eddadddb3b473338abf30a1d5 (patch)
treed2bceeacff8a0d85d0dac1baff52cd9c84548ede /gold/layout.cc
parente6a307bae3aac48d98d01f51308e238aeabbdfd4 (diff)
downloadgdb-f7c8a183e8d2c83eddadddb3b473338abf30a1d5.zip
gdb-f7c8a183e8d2c83eddadddb3b473338abf30a1d5.tar.gz
gdb-f7c8a183e8d2c83eddadddb3b473338abf30a1d5.tar.bz2
PR 10133
* stringpool.h (class Stringpool_template): Add optimize_ field. (Stringpool_template::set_optimize): New function. * stringpool.cc (Stringpool_template::Stringpool_template): Initialize optimize_ field. (Stringpool_template::set_string_offsets): Test local optimize fild rather than parameter. * layout.cc (Layout::Layout): Call set_optimize on the section name stringpool.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index ae2a5dc..4efb9c1 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -137,6 +137,10 @@ Layout::Layout(int number_of_input_files, Script_options* script_options)
// Initialize structure needed for an incremental build.
if (parameters->options().incremental())
this->incremental_inputs_ = new Incremental_inputs;
+
+ // The section name pool is worth optimizing in all cases, because
+ // it is small, but there are often overlaps due to .rel sections.
+ this->namepool_.set_optimize();
}
// Hash a key we use to look up an output section mapping.