* 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.
This commit is contained in:
Ian Lance Taylor
2009-06-23 07:04:10 +00:00
parent e6a307bae3
commit f7c8a183e8
4 changed files with 28 additions and 2 deletions

View File

@@ -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.