This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gold patch] incremental 6/18: track files added by scripts


Cary Coutant <ccoutant@google.com> writes:

> 2011-03-28 Cary Coutant  <ccoutant@google.com>
>
> 	* archive.cc (Archive::include_member): Adjust call to report_object.
> 	(Add_archive_symbols::run): Add script_info to call to
> 	report_archive_begin.
> 	(Lib_group::include_member): Adjust call to report_object.
> 	(Add_lib_group_symbols::run): Adjust call to report_object.
> 	* incremental-dump.cc (dump_incremental_inputs): Remove unnecessary
> 	blocks.  Add object count for script input files.
> 	* incremental.cc (Incremental_inputs::report_archive_begin): Add
> 	script_info parameter; change all callers.
> 	(Incremental_inputs::report_object): Add script_info parameter;
> 	change all callers.
> 	(Incremental_inputs::report_script): Store backpointer to
> 	incremental info entry.
> 	(Output_section_incremental_inputs::set_final_data_size): Record
> 	additional information for scripts.
> 	(Output_section_incremental_inputs::write_info_blocks): Likewise.
> 	* incremental.h (Incremental_script_entry::add_object): New function.
> 	(Incremental_script_entry::get_object_count): New function.
> 	(Incremental_script_entry::get_object): New function.
> 	(Incremental_script_entry::objects_): New data member; adjust
> 	constructor.
> 	(Incremental_inputs::report_archive_begin): Add script_info parameter.
> 	(Incremental_inputs::report_object): Add script_info parameter.
> 	(Incremental_inputs_reader::get_object_count): New function.
> 	(Incremental_inputs_reader::get_object_offset): New function.
> 	* options.cc (Input_arguments::add_file): Return reference to
> 	new input argument.
> 	* options.h (Input_argument::set_script_info): New function.
> 	(Input_argument::script_info): New function.
> 	(Input_argument::script_info_): New data member; adjust all
> 	constructors.
> 	(Input_file_group::add_file): Return reference to new input argument.
> 	(Input_file_lib::add_file): Likewise.
> 	(Input_arguments::add_file): Likewise.
> 	* readsyms.cc (Add_symbols::run): Adjust call to report_object.
> 	* script.cc (Parser_closure::Parser_closure): Add script_info
> 	parameter; adjust all callers.
> 	(Parser_closure::script_info): New function.
> 	(Parser_closure::script_info_): New data member.
> 	(read_input_script): Report scripts earlier to incremental info.
> 	(script_add_file): Set script_info in Input_argument.
> 	(script_add_library): Likewise.
> 	* script.h (Script_options::Script_info): Rewrite class.


> +  // Return the Nth object.
> +  Incremental_input_entry*
> +  get_object(unsigned int n)
> +  { return this->objects_[n]; }

I would be happier if you added
  gold_assert(n < this->objects_.size());


This is OK with that change.

Thanks.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]