* layout.cc (Layout::choose_output_section): If we find an
	existing section, update the flags.
	(Layout::create_notes): New function, broken out of
	Layout::finalize.
	(Layout::finalize): Don't create note sections.
	(Layout::create_note): Don't crash if linker script discards
	section.
	(Layout::create_gold_note): Likewise.
	(Layout::create_build_id): Likewise.  Don't set
	after_input_sections on the section.
	(Layout::create_executable_stack_info): Remove target parameter.
	Change caller.
	* layout.h (class Layout): Declare create_notes.  Update
	declaration of create_executable_stack_info.
	* gold.cc (queue_middle_tasks): Call create_notes.
	* output.cc (Output_section::update_flags_for_input_section): Move
	here from output.h.  If SHF_ALLOC flag is newly set, mark address
	invalid.
	* output.h (Output_data::mark_address_invalid): New function.
	(class Output_section): Only declare, not define,
	update_flags_for_input_section.  Remove set_flags.
This commit is contained in:
Ian Lance Taylor
2009-06-24 19:48:51 +00:00
parent 554585003d
commit 9c547ec3ac
6 changed files with 83 additions and 22 deletions

View File

@@ -208,6 +208,10 @@ class Layout
void
define_section_symbols(Symbol_table*);
// Create automatic note sections.
void
create_notes();
// Create sections for linker scripts.
void
create_script_sections()
@@ -474,7 +478,7 @@ class Layout
// Record whether the stack must be executable.
void
create_executable_stack_info(const Target*);
create_executable_stack_info();
// Create a build ID note if needed.
void