+2011-04-11 Ian Lance Taylor <iant@google.com>
+
+ * incremental.cc (Sized_incr_relobj::do_add_symbols): Always
+ initialize local variable v.
+
+2011-04-11 Cary Coutant <ccoutant@google.com>
+
+ * archive.cc (Archive::include_member): Adjust call to
+ report_object.
+ (Add_archive_symbols::run): Track argument serial numbers.
+ (Lib_group::include_member): Likewise.
+ (Add_lib_group_symbols::run): Adjust call to report_archive_begin.
+ * archive.h (Incremental_archive_entry::Archive_member):
+ Initialize arg_serial_.
+ (Archive_member::arg_serial_): New data member.
+ * dynobj.cc (Dynobj::Dynobj): Allow input_file_ to be NULL.
+ (Sized_dynobj::do_add_symbols): Track symbols when doing an
+ incremental link.
+ (Sized_dynobj::do_for_all_local_got_entries): New function.
+ * dynobj.h: (Sized_dynobj::do_for_all_local_got_entries): New
+ function.
+ * fileread.cc (get_mtime): New function.
+ * fileread.h (get_mtime): New function.
+ * gold.cc (queue_initial_tasks): Check for incremental update.
+ (process_incremental_input): New function.
+ (queue_middle_tasks): Don't force valid target for incremental
+ update.
+ * incremental-dump.cc (find_input_containing_global): Adjust
+ size of symbol info entry.
+ (dump_incremental_inputs): Dump argument serial number and
+ in_system_directory flag; bias shndx by 1; print symbol names
+ when dumping per-file symbol lists; use new symbol info readers.
+ * incremental.cc
+ (Output_section_incremental_inputs:update_data_size): New function.
+ (Sized_incremental_binary::setup_readers): Setup input readers
+ for each input file; build maps for files added from libraries
+ and scripts.
+ (Sized_incremental_binary::check_input_args): New function.
+ (Sized_incremental_binary::do_check_inputs): Build map of argument
+ serial numbers to input arguments.
+ (Sized_incremental_binary::do_file_has_changed): Rename
+ do_file_is_unchanged to this; compare file modification times.
+ (Sized_incremental_binary::do_init_layout): New function.
+ (Sized_incremental_binary::do_reserve_layout): New function.
+ (Sized_incremental_binary::do_get_input_reader): Remove.
+ (Sized_incremental_binary::get_symtab_view): New function.
+ (Incremental_checker::can_incrementally_link_output_file): Remove.
+ (Incremental_inputs::report_command_line): Exclude --debug options.
+ (Incremental_inputs::report_archive_begin): Add parameter; track
+ argument serial numbers; don't put input file entry for archive
+ before archive members.
+ (Incremental_inputs::report_archive_end): Put input file entry
+ for archive after archive members.
+ (Incremental_inputs::report_object): Add parameter; track argument
+ serial numbers and in_system_directory flag.
+ (Incremental_inputs::report_script): Add parameter; track argument
+ serial numbers.
+ (Output_section_incremental_inputs::set_final_data_size): Adjust
+ size of symbol info entry; check for forwarding symbols.
+ (Output_section_incremental_inputs::write_input_files): Write
+ in_system_directory flag and argument serial number.
+ (Output_section_incremental_inputs::write_info_blocks): Map section
+ indices between incremental info and original input file; store
+ input section index for each symbol.
+ (class Local_got_offset_visitor): Derive from Got_offset_list::Visitor;
+ change operator() to visit().
+ (class Global_got_offset_visitor): Likewise.
+ (class Global_symbol_visitor_got_plt):
+ (Output_section_incremental_inputs::write_got_plt): Use new visitor
+ classes.
+ (Sized_incr_relobj::Sized_incr_relobj): New constructor.
+ (Sized_incr_relobj::do_read_symbols): New function.
+ (Sized_incr_relobj::do_layout): New function.
+ (Sized_incr_relobj::do_layout_deferred_sections): New function.
+ (Sized_incr_relobj::do_add_symbols): New function.
+ (Sized_incr_relobj::do_should_include_member): New function.
+ (Sized_incr_relobj::do_for_all_global_symbols): New function.
+ (Sized_incr_relobj::do_for_all_local_got_entries): New function.
+ (Sized_incr_relobj::do_section_size): New function.
+ (Sized_incr_relobj::do_section_name): New function.
+ (Sized_incr_relobj::do_section_contents): New function.
+ (Sized_incr_relobj::do_section_flags): New function.
+ (Sized_incr_relobj::do_section_entsize): New function.
+ (Sized_incr_relobj::do_section_address): New function.
+ (Sized_incr_relobj::do_section_type): New function.
+ (Sized_incr_relobj::do_section_link): New function.
+ (Sized_incr_relobj::do_section_info): New function.
+ (Sized_incr_relobj::do_section_addralign): New function.
+ (Sized_incr_relobj::do_initialize_xindex): New function.
+ (Sized_incr_relobj::do_get_global_symbol_counts): New function.
+ (Sized_incr_relobj::do_read_relocs): New function.
+ (Sized_incr_relobj::do_gc_process_relocs): New function.
+ (Sized_incr_relobj::do_scan_relocs): New function.
+ (Sized_incr_relobj::do_count_local_symbols): New function.
+ (Sized_incr_relobj::do_finalize_local_symbols): New function.
+ (Sized_incr_relobj::do_set_local_dynsym_indexes): New function.
+ (Sized_incr_relobj::do_set_local_dynsym_offset): New function.
+ (Sized_incr_relobj::do_relocate): New function.
+ (Sized_incr_relobj::do_set_section_offset): New function.
+ (Sized_incr_dynobj::Sized_incr_dynobj): New function.
+ (Sized_incr_dynobj::do_read_symbols): New function.
+ (Sized_incr_dynobj::do_layout): New function.
+ (Sized_incr_dynobj::do_add_symbols): New function.
+ (Sized_incr_dynobj::do_should_include_member): New function.
+ (Sized_incr_dynobj::do_for_all_global_symbols): New function.
+ (Sized_incr_dynobj::do_for_all_local_got_entries): New function.
+ (Sized_incr_dynobj::do_section_size): New function.
+ (Sized_incr_dynobj::do_section_name): New function.
+ (Sized_incr_dynobj::do_section_contents): New function.
+ (Sized_incr_dynobj::do_section_flags): New function.
+ (Sized_incr_dynobj::do_section_entsize): New function.
+ (Sized_incr_dynobj::do_section_address): New function.
+ (Sized_incr_dynobj::do_section_type): New function.
+ (Sized_incr_dynobj::do_section_link): New function.
+ (Sized_incr_dynobj::do_section_info): New function.
+ (Sized_incr_dynobj::do_section_addralign): New function.
+ (Sized_incr_dynobj::do_initialize_xindex): New function.
+ (Sized_incr_dynobj::do_get_global_symbol_counts): New function.
+ (make_sized_incremental_object): New function.
+ (Incremental_library::copy_unused_symbols): New function.
+ (Incremental_library::do_for_all_unused_symbols): New function.
+ * incremental.h (enum Incremental_input_flags): New type.
+ (class Incremental_checker): Remove.
+ (Incremental_input_entry::Incremental_input_entry): Add argument
+ serial number.
+ (Incremental_input_entry::arg_serial): New function.
+ (Incremental_input_entry::set_is_in_system_directory): New function.
+ (Incremental_input_entry::is_in_system_directory): New function.
+ (Incremental_input_entry::arg_serial_): New data member.
+ (Incremental_input_entry::is_in_system_directory_): New data member.
+ (class Script_info): Move here from script.h.
+ (Script_info::Script_info): Add filename parameter.
+ (Script_info::filename): New function.
+ (Script_info::filename_): New data member.
+ (Incremental_script_entry::Incremental_script_entry): Add argument
+ serial number.
+ (Incremental_object_entry::Incremental_object_entry): Likewise.
+ (Incremental_object_entry::add_input_section): Build list of input
+ sections with map to original shndx.
+ (Incremental_object_entry::get_input_section_index): New function.
+ (Incremental_object_entry::shndx_): New data member.
+ (Incremental_object_entry::name_key_): Rename; adjust all refs.
+ (Incremental_object_entry::sh_size_): Rename; adjust all refs.
+ (Incremental_archive_entry::Incremental_archive_entry): Add argument
+ serial number.
+ (Incremental_inputs::report_archive_begin): Likewise.
+ (Incremental_inputs::report_object): Likewise.
+ (Incremental_inputs::report_script): Likewise.
+ (class Incremental_global_symbol_reader): New class.
+ (Incremental_input_entry_reader::Incremental_input_entry_reader): Read
+ and store flags and input file type.
+ (Incremental_input_entry_reader::arg_serial): New function.
+ (Incremental_input_entry_reader::type): Extract type from flags.
+ (Incremental_input_entry_reader::is_in_system_directory): New function.
+ (Incremental_input_entry_reader::get_input_section_count): Call
+ accessor function for type.
+ (Incremental_input_entry_reader::get_symbol_offset): Call accessor
+ function for type; adjust size of global symbol entry.
+ (Incremental_input_entry_reader::get_global_symbol_count): Call
+ accessor function for type.
+ (Incremental_input_entry_reader::get_object_count): Likewise.
+ (Incremental_input_entry_reader::get_object_offset): Likewise.
+ (Incremental_input_entry_reader::get_member_count): Likewise.
+ (Incremental_input_entry_reader::get_unused_symbol_count): Likewise.
+ (Incremental_input_entry_reader::get_member_offset): Likewise.
+ (Incremental_input_entry_reader::get_unused_symbol): Likewise.
+ (Incremental_input_entry_reader::Global_symbol_info): Remove.
+ (Incremental_input_entry_reader::get_global_symbol_info): Remove.
+ (Incremental_input_entry_reader::get_global_symbol_reader): New
+ function.
+ (Incremental_input_entry_reader::get_output_symbol_index): New
+ function.
+ (Incremental_input_entry_reader::type_): Remove.
+ (Incremental_input_entry_reader::flags_): New data member.
+ (Incremental_inputs_reader::input_file_offset): New function.
+ (Incremental_inputs_reader::input_file_index): New function.
+ (Incremental_inputs_reader::input_file): Call input_file_offset.
+ (Incremental_inputs_reader::input_file_at_offset): New function.
+ (Incremental_relocs_reader::get_r_type): Reformat.
+ (Incremental_relocs_reader::get_r_shndx): Reformat.
+ (Incremental_relocs_reader::get_r_offset): Reformat.
+ (Incremental_relocs_reader::data): New function.
+ (Incremental_binary::Incremental_binary): Initialize new data members.
+ (Incremental_binary::check_inputs): Add cmdline parameter.
+ (Incremental_binary::file_is_unchanged): Remove.
+ (Input_reader::arg_serial): New function.
+ (Input_reader::get_unused_symbol_count): New function.
+ (Input_reader::get_unused_symbol): New function.
+ (Input_reader::do_arg_serial): New function.
+ (Input_reader::do_get_unused_symbol_count): New function.
+ (Input_reader::do_get_unused_symbol): New function.
+ (Incremental_binary::input_file_count): New function.
+ (Incremental_binary::get_input_reader): Change signature to use
+ index instead of filename.
+ (Incremental_binary::file_has_changed): New function.
+ (Incremental_binary::get_input_argument): New function.
+ (Incremental_binary::get_library): New function.
+ (Incremental_binary::get_script_info): New function.
+ (Incremental_binary::init_layout): New function.
+ (Incremental_binary::reserve_layout): New function.
+ (Incremental_binary::output_file): New function.
+ (Incremental_binary::do_check_inputs): New function.
+ (Incremental_binary::do_file_is_unchanged): Remove.
+ (Incremental_binary::do_file_has_changed): New function.
+ (Incremental_binary::do_init_layout): New function.
+ (Incremental_binary::do_reserve_layout): New function.
+ (Incremental_binary::do_input_file_count): New function.
+ (Incremental_binary::do_get_input_reader): Change signature.
+ (Incremental_binary::input_args_map_): New data member.
+ (Incremental_binary::library_map_): New data member.
+ (Incremental_binary::script_map_): New data member.
+ (Sized_incremental_binary::Sized_incremental_binary): Initialize
+ new data members.
+ (Sized_incremental_binary::output_section): New function.
+ (Sized_incremental_binary::inputs_reader): Add const.
+ (Sized_incremental_binary::symtab_reader): Add const.
+ (Sized_incremental_binary::relocs_reader): Add const.
+ (Sized_incremental_binary::got_plt_reader): Add const.
+ (Sized_incremental_binary::get_symtab_view): New function.
+ (Sized_incremental_binary::Inputs_reader): New typedef.
+ (Sized_incremental_binary::Input_entry_reader): New typedef.
+ (Sized_incremental_binary::do_check_inputs): Add cmdline parameter.
+ (Sized_incremental_binary::do_file_is_unchanged): Remove.
+ (Sized_incremental_binary::do_file_has_changed): New function.
+ (Sized_incremental_binary::do_init_layout): New function.
+ (Sized_incremental_binary::do_reserve_layout): New function.
+ (Sized_input_reader::Inputs_reader): Remove.
+ (Sized_input_reader::Input_entry_reader): Remove.
+ (Sized_input_reader::do_arg_serial): New function.
+ (Sized_input_reader::do_get_unused_symbol_count): New function.
+ (Sized_input_reader::do_get_unused_symbol): New function.
+ (Sized_incremental_binary::do_input_file_count): New function.
+ (Sized_incremental_binary::do_get_input_reader): Change signature;
+ use index instead of filename.
+ (Sized_incremental_binary::section_map_): New data member.
+ (Sized_incremental_binary::input_entry_readers_): New data member.
+ (class Sized_incr_relobj): New class.
+ (class Sized_incr_dynobj): New class.
+ (make_sized_incremental_object): New function.
+ (class Incremental_library): New class.
+ * layout.cc (Free_list::num_lists): New static data member.
+ (Free_list::num_nodes): New static data member.
+ (Free_list::num_removes): New static data member.
+ (Free_list::num_remove_visits): New static data member.
+ (Free_list::num_allocates): New static data member.
+ (Free_list::num_allocate_visits): New static data member.
+ (Free_list::init): New function.
+ (Free_list::remove): New function.
+ (Free_list::allocate): New function.
+ (Free_list::dump): New function.
+ (Free_list::print_stats): New function.
+ (Layout_task_runner::run): Resize output file for incremental updates.
+ (Layout::Layout): Initialize new data members.
+ (Layout::set_incremental_base): New function.
+ (Layout::init_fixed_output_section): New function.
+ (Layout::layout_eh_frame): Do not build .eh_frame_hdr section for
+ incremental updates.
+ (Layout::create_gold_note): Do not create gold note section for
+ incremental updates.
+ (Layout::set_segment_offsets): Do not recalculate RELRO alignment
+ for incremental updates.
+ (Layout::set_section_offsets): For incremental updates, allocate space
+ from free list.
+ (Layout::create_symtab_sections): Layout with offsets relative to
+ start of section; for incremental updates, allocate space from free
+ list.
+ (Layout::create_shdrs): For incremental updates, allocate space from
+ free list.
+ (Layout::finish_dynamic_section): For incremental updates, do not
+ check --as-needed (fixed in subsequent patch).
+ * layout.h (class Free_list): New class.
+ (Layout::set_incremental_base): New function.
+ (Layout::incremental_base): New function.
+ (Layout::init_fixed_output_section): New function.
+ (Layout::allocate): New function.
+ (Layout::incremental_base_): New data member.
+ (Layout::free_list_): New data member.
+ * main.cc (main): Print Free_list statistics.
+ * object.cc (Relobj::finalize_incremental_relocs): Add
+ clear_counts parameter; clear counts only when clear_counts is set.
+ (Sized_relobj::Sized_relobj): Initialize new base class.
+ (Sized_relobj::do_layout): Don't report special sections.
+ (Sized_relobj::do_for_all_local_got_entries): New function.
+ (Sized_relobj::write_local_symbols): Add symtab_off parameter; add
+ symtab_off to all symbol table offsets.
+ (Sized_relobj::do_get_global_symbol_counts): Add typename keyword.
+ * object.h (class Got_offset_list): Move to top of file.
+ (Object::Object): Allow case where input_file == NULL.
+ (Object::~Object): Likewise.
+ (Object::input_file): Assert that input_file != NULL.
+ (Object::lock): Allow case where input_file == NULL.
+ (Object::unlock): Likewise.
+ (Object::is_locked): Likewise.
+ (Object::token): Likewise.
+ (Object::release): Likewise.
+ (Object::is_incremental): New function.
+ (Object::get_mtime): New function.
+ (Object::for_all_local_got_entries): New function.
+ (Object::clear_view_cache_marks): Allow case where input_file == NULL.
+ (Object::set_is_in_system_directory): New function.
+ (Object::is_in_system_directory): New function.
+ (Object::do_is_incremental): New function.
+ (Object::do_get_mtime): New function.
+ (Object::do_for_all_local_got_entries): New function.
+ (Object::is_in_system_directory_): New data member.
+ (Relobj::finalize_incremental_relocs): Add clear_counts parameter.
+ (class Sized_relobj_base): New class.
+ (class Sized_relobj): Derive from Sized_relobj_base.
+ (class Sized_relobj::Symbols): Redeclare from base class.
+ (class Sized_relobj::local_got_offset_list): Remove.
+ (class Sized_relobj::Output_sections): Redeclare from base class.
+ (class Sized_relobj::do_for_all_local_got_entries): New function.
+ (class Sized_relobj::write_local_symbols): Add offset parameter.
+ (class Sized_relobj::local_symbol_offset_): Update comment.
+ (class Sized_relobj::local_dynsym_offset_): Update comment.
+ * options.cc (Input_arguments::add_file): Remove const.
+ * options.h (Input_file_argument::Input_file_argument):
+ Initialize arg_serial_ (all constructors).
+ (Input_file_argument::set_arg_serial): New function.
+ (Input_file_argument::arg_serial): New function.
+ (Input_file_argument::arg_serial_): New data member.
+ (Input_arguments::Input_arguments): Initialize file_count_.
+ (Input_arguments::add_file): Remove const.
+ (Input_arguments::number_of_input_files): New function.
+ (Input_arguments::file_count_): New data member.
+ (Command_line::number_of_input_files): Call
+ Input_arguments::number_of_input_files.
+ * output.cc (Output_segment_headers::Output_segment_headers):
+ Set current size.
+ (Output_section::Input_section::current_data_size): New function.
+ (Output_section::Output_section): Initialize new data members.
+ (Output_section::add_input_section): Don't do merge sections for
+ an incremental link; allocate space from free list for an
+ incremental update.
+ (Output_section::add_output_section_data): Allocate space from
+ free list for an incremental update.
+ (Output_section::update_data_size): New function.
+ (Output_section::set_fixed_layout): New function.
+ (Output_section::reserve): New function.
+ (Output_segment::set_section_addresses): Remove const.
+ (Output_segment::set_section_list_addresses): Remove const; allocate
+ space from free list for an incremental update.
+ (Output_segment::set_offset): Adjust size of RELRO segment for an
+ incremental update.
+ * output.h (Output_data::current_data_size): Move here from
+ child classes.
+ (Output_data::pre_finalize_data_size): New function.
+ (Output_data::update_data_size): New function.
+ (Output_section_headers::update_data_size): new function.
+ (Output_section_data_build::current_data_size): Move to Output_data.
+ (Output_data_strtab::update_data_size): New function.
+ (Output_section::current_data_size): Move to Output_data.
+ (Output_section::set_fixed_layout): New function.
+ (Output_section::has_fixed_layout): New function.
+ (Output_section::reserve): New function.
+ (Output_section::update_data_size): New function.
+ (Output_section::has_fixed_layout_): New data member.
+ (Output_section::free_list_): New data member.
+ (Output_segment::set_section_addresses): Remove const.
+ (Output_segment::set_section_list_addresses): Remove const.
+ * plugin.cc (Sized_pluginobj::do_for_all_local_got_entries):
+ New function.
+ * plugin.h (Sized_pluginobj::do_for_all_local_got_entries):
+ New function.
+ * readsyms.cc (Read_symbols::do_read_symbols): Add library
+ parameter when calling Add_symbols constructor; store argument
+ serial number for members of a lib group.
+ (Add_symbols::locks): Allow case where token == NULL.
+ (Add_symbols::run): Report libraries denoted by --start-lib/--end-lib.
+ (Read_member::~Read_member): New function.
+ (Read_member::is_runnable): New function.
+ (Read_member::locks): New function.
+ (Read_member::run): New function.
+ (Check_script::~Check_script): New function.
+ (Check_script::is_runnable): New function.
+ (Check_script::locks): New function.
+ (Check_script::run): New function.
+ (Check_library::~Check_library): New function.
+ (Check_library::is_runnable): New function.
+ (Check_library::locks): New function.
+ (Check_library::run): New function.
+ * readsyms.h (Add_symbols::Add_symbols): Add library parameter.
+ (Add_symbols::library_): New data member.
+ (class Read_member): New class.
+ (class Check_script): New class.
+ (class Check_library): New class.
+ * reloc.cc (Read_relocs::is_runnable): Allow case where
+ token == NULL.
+ (Read_relocs::locks): Likewise.
+ (Scan_relocs::locks): Likewise.
+ (Relocate_task::locks): Likewise.
+ (Sized_relobj::do_scan_relocs): Tell finalize_incremental_relocs
+ to clear counters.
+ (Sized_relobj::incremental_relocs_scan): Fix comment.
+ (Sized_relobj::do_relocate): Pass output file offset to
+ write_local_symbols.
+ (Sized_relobj::incremental_relocs_write_reltype): Use reloc_size
+ from class declaration.
+ * script.cc (read_input_script): Allocate Script_info; pass
+ argument serial number to report_script.
+ * script.h (class Script_info): Move to incremental.h.
+ * symtab.cc (Symbol_table::add_from_incrobj): New function.
+ * symtab.h (Symbol_table::add_from_incrobj): New function.
+ (Symbol_table::set_file_offset): New function.
+
+2011-04-05 Cary Coutant <ccoutant@google.com>
+
+ * incremental-dump.cc (dump_incremental_inputs): Change signature
+ to take a Sized_incremental_binary; change caller. Use readers
+ in Sized_incremental_binary.
+ * incremental.cc
+ (Sized_incremental_binary::find_incremental_inputs_sections):
+ Rename do_find_incremental_inputs_sections to this.
+ (Sized_incremental_binary::setup_readers): New function.
+ (Sized_incremental_binary::do_check_inputs): Check
+ has_incremental_info_ flag; move setup code to setup_readers;
+ use input readers.
+ (Sized_incremental_binary::do_file_is_unchanged): New function.
+ (Sized_incremental_binary::do_get_input_reader): New function.
+ * incremental.h (class Incremental_binary): Move to end of file.
+ (Incremental_binary::file_is_unchanged): New function.
+ (Incremental_binary::do_file_is_unchanged): New function.
+ (Incremental_binary::Input_reader): New class.
+ (Incremental_binary::get_input_reader): New function.
+ (class Sized_incremental_binary): Move to end of file.
+ (Sized_incremental_binary::Sized_incremental_binary): Setup the
+ input section reader classes.
+ (Sized_incremental_binary::has_incremental_info): New function.
+ (Sized_incremental_binary::inputs_reader): New function.
+ (Sized_incremental_binary::symtab_reader): New function.
+ (Sized_incremental_binary::relocs_reader): New function.
+ (Sized_incremental_binary::got_plt_reader): New function.
+ (Sized_incremental_binary::do_file_is_unchanged): New function.
+ (Sized_incremental_binary::Sized_input_reader): New class.
+ (Sized_incremental_binary::get_input_reader): New function.
+ (Sized_incremental_binary::find_incremental_inputs_sections):
+ Rename do_find_incremental_inputs_sections to this.
+ (Sized_incremental_binary::setup_readers): New function.
+ (Sized_incremental_binary::has_incremental_info_): New data member.
+ (Sized_incremental_binary::inputs_reader_): New data member.
+ (Sized_incremental_binary::symtab_reader_): New data member.
+ (Sized_incremental_binary::relocs_reader_): New data member.
+ (Sized_incremental_binary::got_plt_reader_): New data member.
+ (Sized_incremental_binary::current_input_file_): New data member.
+
+2011-04-05 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ PR gold/12640
+ * dwarf_reader.cc (Sized_dwarf_line_info): Fix vector bounds
+ violation.
+
+2011-03-30 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.
+
+2011-03-29 Cary Coutant <ccoutant@google.com>
+
+ * archive.cc (Library_base::should_include_member): Move
+ method here from class Archive.
+ (Archive::Archive): Initialize base class.
+ (Archive::should_include_member): Move to base class.
+ (Archive::do_for_all_unused_symbols): New function.
+ (Add_archive_symbols::run): Remove redundant access to
+ incremental_inputs.
+ (Lib_group::Lib_group): Initialize base class.
+ (Lib_group::do_filename): New function.
+ (Lib_group::include_member): Pass pointer to Lib_group to
+ report_object.
+ (Lib_group::do_for_all_unused_symbols): New function.
+ (Add_lib_group_symbols::run): Report archive information for
+ incremental links.
+ * archive.h (class Library_base): New base class.
+ (class Archive): Derive from Library_base.
+ (Archive::filename): Move to base class.
+ (Archive::set_incremental_info): Likewise.
+ (Archive::incremental_info): Likewise.
+ (Archive::Should_include): Likewise.
+ (Archive::should_include_member): Likewise.
+ (Archive::Armap_entry): Remove.
+ (Archive::Unused_symbol_iterator): Remove.
+ (Archive::unused_symbols_begin): Remove.
+ (Archive::unused_symbols_end): Remove.
+ (Archive::do_filename): New function.
+ (Archive::do_get_mtime): New function.
+ (Archive::do_for_all_unused_symbols): New function.
+ (Archive::task_): Move to base class.
+ (Archive::incremental_info_): Likewise.
+ (class Lib_group): Derive from Library_base.
+ (Lib_group::do_filename): New function.
+ (Lib_group::do_get_mtime): New function.
+ (Lib_group::do_for_all_unused_symbols): New function.
+ (Lib_group::task_): Move to base class.
+ * dynobj.cc (Sized_dynobj::do_for_all_global_symbols): New
+ function.
+ * dynobj.h (Sized_dynobj::do_for_all_global_symbols): New
+ function.
+ * incremental.cc (Incremental_inputs::report_archive_begin):
+ Use Library_base; call library's get_mtime; add incremental inputs
+ entry before members.
+ (class Unused_symbol_visitor): New class.
+ (Incremental_inputs::report_archive_end): Use Library_base; use
+ visitor class to record unused symbols; don't add incremental inputs
+ entry after members.
+ (Incremental_inputs::report_object): Use Library_base.
+ * incremental.h
+ (Incremental_archive_entry::Incremental_archive_entry): Remove
+ unused Archive parameter.
+ (Incremental_inputs::report_archive_begin): Use Library_base.
+ (Incremental_inputs::report_archive_end): Likewise.
+ (Incremental_inputs::report_object): Likewise.
+ * object.cc (Sized_relobj::do_for_all_global_symbols): New
+ function.
+ * object.h (Object::for_all_global_symbols): New function.
+ (Object::do_for_all_global_symbols): New function.
+ (Sized_relobj::do_for_all_global_symbols): New function.
+ * plugin.cc (Sized_pluginobj::do_for_all_global_symbols): New
+ function.
+ * plugin.h (Sized_pluginobj::do_for_all_global_symbols): New
+ function.
+
+2011-03-27 Ian Lance Taylor <iant@google.com>
+
+ * archive.cc (Archive::interpret_header): Return -1 if something
+ goes wrong. Change callers accordingly.
+
+2011-03-25 Cary Coutant <ccoutant@google.com>
+
+ * testsuite/Makefile.am (final_layout.stdout): Use -n option with nm.
+ * testsuite/Makefile.in: Regenerate.
+
+2010-03-23 Rafael Ávila de Espíndola <respindola@mozilla.com>
+
+ * plugin.cc (get_view): New.
+ (Plugin::load): Pass get_view to the plugin.
+ (Plugin_manager::get_view): New.
+
+2011-03-21 Ian Lance Taylor <iant@google.com>
+
+ * testsuite/final_layout.sh: Rewrite to not use dc.
+ * testsuite/relro_test.sh: Fail if dc is not present.
+
+2011-03-21 Sriraman Tallam <tmsriram@google.com>
+
+ * testsuite/icf_safe_so_test.sh: Add #!/bin/sh to start.
+ Change == to -eq.
+ * testsuite/icf_string_merge_test.sh: Add #!/bin/sh to start.
+ * testsuite/icf_safe_test.sh: Add #!/bin/sh to start.
+ Change == to -eq.
+ * testsuite/icf_sht_rel_addend_test.sh: Add #!/bin/sh to start.
+ * testsuite/icf_preemptible_functions_test.sh: Add #!/bin/sh to start.
+
+2011-03-14 Ian Lance Taylor <iant@google.com>
+
+ * script-sections.cc (Sort_output_sections::script_compare):
+ Rename from is_before, change return type.
+ (Sort_output_sections::operator()): Adjust accordingly.
+
+2011-03-11 Jeffrey Yasskin <jyasskin@google.com>
+
+ PR gold/12572
+ * testsuite/odr_violation2.cc: Add comment to make all error line
+ numbers double digits.
+ * testsuite/debug_msg.sh: Adjust expected errors.
+
+2011-03-09 Jeffrey Yasskin <jyasskin@google.com>
+
+ * dwarf_reader.cc (Sized_dwarf_line_info): Include all lines,
+ but mark earlier ones as non-canonical
+ (offset_to_iterator): Update search target and example
+ (do_addr2line): Return extra lines in a vector*
+ (format_file_lineno): Extract from do_addr2line
+ (one_addr2line): Add vector* out-param
+ * dwarf_reader.h (Offset_to_lineno_entry): New field recording
+ when a lineno entry appeared last for its instruction
+ (Dwarf_line_info): Add vector* out-param
+ * object.cc (Relocate_info): Pass NULL for the vector* out-param
+ * symtab.cc (Odr_violation_compare): Include the lineno in the
+ comparison again.
+ (linenos_from_loc): New. Combine the canonical line for an
+ address with its other lines.
+ (True_if_intersect): New. Helper functor to make
+ std::set_intersection a query.
+ (detect_odr_violations): Compare sets of lines instead of just
+ one line for each function. This became less deterministic, but
+ has fewer false positives.
+ * symtab.h: Declarations.
+ * testsuite/Makefile.am (odr_violation2.o): Compile with -O2 to
+ mix an optimized and non-optimized object in the same binary
+ (odr_violation2.so): Same.
+ * testsuite/Makefile.in: Regenerate from Makefile.am.
+ * testsuite/debug_msg.cc (main): Make OdrDerived classes.
+ * testsuite/debug_msg.sh: Update line numbers and add
+ assertions.
+ * testsuite/odr_violation1.cc: Use OdrDerived, in a
+ non-optimized context.
+ * testsuite/odr_violation2.cc: Make sure Ordering::operator()
+ isn't inlined, and use OdrDerived in an optimized context.
+ * testsuite/odr_header1.h: Defines OdrDerived, where
+ optimization will change the
+ first-instruction-in-the-destructor's file and line number.
+ * testsuite/odr_header2.h: Defines OdrBase.
+
+2011-03-09 Ian Lance Taylor <iant@google.com>
+
+ * fileread.cc (File_read::clear_views): Don't delete the whole
+ file view.
+
+2011-03-08 Ian Lance Taylor <iant@google.com>
+
+ PR gold/12525
+ * fileread.cc: #include <climits>.
+ (GOLD_IOV_MAX): Define.
+ (File_read::read_multiple): Limit number of entries by iov_max.
+ * fileread.h (class File_read): Always set max_readv_entries to
+ 128.
+
+2011-03-07 Ian Lance Taylor <iant@google.com>
+
+ PR gold/12525
+ * options.h (class General_options): Add -dy and -dn.
+
+2011-03-02 Cary Coutant <ccoutant@google.com>
+
+ * testsuite/script_test_9.t: Add TLS segment.
+
+2011-03-02 Simon Baldwin <simonb@google.com>
+
+ * configure.ac: Add check for gnu_indirect_function support in
+ the toolchain building binutils.
+ * configure: Rebuild.
+
+2010-02-18 Rafael Ávila de Espíndola <respindola@mozilla.com>
+
+ * symtab.cc (Symbol::should_add_dynsym_entry) Return false for
+ plugin only symbols.
+ (Symbol_table::sized_finalize_symbol) Mark symbol only present
+ in plugin files as not needed in the symbol table.
+
+2011-02-11 Sriraman Tallam <tmsriram@google.com>
+
+ * output.cc (Output_section::add_input_section): Delay fill
+ generation for section ordering.
+
+2011-02-09 Ian Lance Taylor <iant@google.com>
+
+ PR gold/12316
+ * object.h (class Sized_relobj): Remove clear_local_symbols.
+ * reloc.cc (Sized_relobj::do_relocate): Don't call
+ clear_local_symbols.
+
+2010-02-08 Rafael Ávila de Espíndola <respindola@mozilla.com>
+
+ * plugin.cc (is_visible_from_outside): Return true for symbols
+ in the -u option.
+
+2011-02-04 Jeffrey Yasskin <jyasskin@google.com>
+
+ * symtab.cc (Odr_violation_compare::operator()): Sort by just the
+ filename.
+
+2011-02-02 Sriraman Tallam <tmsriram@google.com>
+
+ * icf.h (is_section_foldable_candidate): Change type of parameter
+ to std::string.
+ * icf.cc (Icf::find_identical_sections): Change type of local variable
+ section_name to be std::string.
+ (is_function_ctor_or_dtor): Change type of parameter to std::string.
+
+2011-01-25 Ian Lance Taylor <iant@google.com>
+
+ * script.cc (script_add_extern): Rewrite to use
+ add_symbol_reference.
+
+2011-01-25 Doug Kwan <dougkwan@google.com>
+
+ * icf.cc (get_section_contents): Always lock section's object.
+
+2011-01-24 Ian Lance Taylor <iant@google.com>
+
+ * options.h (class General_options): Accept
+ --no-detect-odr-violations.
+
+2011-01-24 Ian Lance Taylor <iant@google.com>
+
+ * version.cc (version_string): Bump to 1.11.
+
+2011-01-24 Ian Lance Taylor <iant@google.com>
+
+ * plugin.cc (class Plugin_rescan): Define new class.
+ (Plugin_manager::claim_file): Set any_claimed_.
+ (Plugin_manager::save_archive): New function.
+ (Plugin_manager::save_input_group): New function.
+ (Plugin_manager::all_symbols_read): Create Plugin_rescan task if
+ necessary.
+ (Plugin_manager::new_undefined_symbol): New function.
+ (Plugin_manager::rescan): New function.
+ (Plugin_manager::rescannable_defines): New function.
+ (Plugin_manager::add_input_file): Set any_added_.
+ * plugin.h (class Plugin_manager): define new fields rescannable_,
+ undefined_symbols_, any_claimed_, and any_added_. Declare
+ Plugin_rescan as friend. Declare new functions.
+ (Plugin_manager::Rescannable): Define type.
+ (Plugin_manager::Rescannable_list): Define type.
+ (Plugin_manager::Undefined_symbol_list): Define type.
+ (Plugin_manager::Plugin_manager): Initialize new fields.
+ * archive.cc (Archive::defines_symbol): New function.
+ (Add_archive_symbols::run): Pass archive to plugins if any.
+ * archive.h (class Archive): Declare defines_symbol.
+ * readsyms.cc (Input_group::~Input_group): New function.
+ (Finish_group::run): Pass input_group to plugins if any.
+ * readsyms.h (class Input_group): Declare destructor.
+ * symtab.cc (add_from_object): Pass undefined symbol to plugins if
+ any.
+
+2011-01-10 Ian Lance Taylor <iant@google.com>
+
+ * layout.cc (Layout::layout_eh_frame): Mark a writable .eh_frame
+ section as relro.
+ (Layout::set_segment_offsets): Reset increase_relro before calling
+ set_section_addresses a second time.
+
+2011-01-04 Cary Coutant <ccoutant@google.com>
+
+ * script-sections.cc (Sort_output_sections::operator()): Sort TLS
+ sections before NOBITS sections.
+
+2011-01-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ * version.cc (print_version): Update copyright to 2011.
+
+2010-12-23 Cary Coutant <ccoutant@google.com>
+
+ * output.h (Output_data_reloc::add_output_section): Pass OD instead
+ of OS to this->add. Add OD parameter to second form of the function.
+
+2010-12-20 Ian Lance Taylor <iant@google.com>
+
+ * dwarf_reader.cc (Sized_dwarf_line_info::read_lines): Only keep
+ second of two consecutive entries with same offset.
+
+2010-12-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * testsuite/Makefile.am (ifuncmain2static_LDADD)
+ (ifuncmain2_LDADD, ifuncmain4static_LDADD, ifuncmain4_LDADD)
+ (ifuncmain7static_LDADD, ifuncmain7_LDADD): New empty variables,
+ to avoid unneeded links against $(LDADD).
+ * testsuite/Makefile.in: Regenerate.
+
+2010-12-15 Ian Lance Taylor <iant@google.com>
+
+ PR gold/12324
+ * x86_64.cc (Target_x86_64::Scan::check_non_pic): Give an error
+ for R_X86_64_32 and R_X86_64_PC32.
+ * testsuite/Makefile.am (ver_matching_def.so): Depend on and use
+ ver_matching_def_pic.o.
+ (ver_matching_def_pic.o): New target.
+
+2010-12-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * fileread.cc (file_counts_lock, file_counts_initialize_lock)
+ (total_mapped_bytes, current_mapped_bytes, maximum_mapped_bytes):
+ Move definition before File_read::View member definitions.
+ (File_read::View::~View): Initialize and hold lock before
+ updating current_mapped_bytes.
+
+2010-12-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * dwarf_reader.cc: Remove outdated comment.
+ * gold-threads.cc: Fix typo in error message.
+ * archive.cc: Fix typos in comments.
+ * archive.h: Likewise.
+ * arm-reloc-property.cc: Likewise.
+ * arm-reloc-property.h: Likewise.
+ * arm-reloc.def: Likewise.
+ * arm.cc: Likewise.
+ * attributes.h: Likewise.
+ * cref.cc: Likewise.
+ * ehframe.cc: Likewise.
+ * fileread.h: Likewise.
+ * gold.h: Likewise.
+ * i386.cc: Likewise.
+ * icf.cc: Likewise.
+ * incremental.h: Likewise.
+ * int_encoding.cc: Likewise.
+ * layout.h: Likewise.
+ * main.cc: Likewise.
+ * merge.h: Likewise.
+ * object.cc: Likewise.
+ * object.h: Likewise.
+ * options.cc: Likewise.
+ * readsyms.cc: Likewise.
+ * reduced_debug_output.cc: Likewise.
+ * reloc.cc: Likewise.
+ * script-sections.cc: Likewise.
+ * sparc.cc: Likewise.
+ * symtab.h: Likewise.
+ * target-reloc.h: Likewise.
+ * target.cc: Likewise.
+ * target.h: Likewise.
+ * timer.cc: Likewise.
+ * timer.h: Likewise.
+ * x86_64.cc: Likewise.
+
+2010-12-09 Cary Coutant <ccoutant@google.com>
+
+ * layout.cc (Layout::layout_gnu_stack): Add warnings for executable
+ stack.
+ * layout.h (Layout::layout_gnu_stack): Add pointer to Object
+ parameter; change all callers.
+ * object.cc (Sized_relobj::do_layout): Adjust call to layout_gnu_stack.
+ * options.h (warn_execstack): New option.
+
+2010-12-07 Doug Kwan <dougkwan@google.com>
+
+ * arm.cc (Target_arm::Scan::get_reference_flags): Treat R_ARM_PREL31
+ like function call relocations.
+
+2010-12-07 Ian Lance Taylor <iant@google.com>
+
+ * archive.cc (Archive::get_elf_object_for_member): Permit
+ punconfigured to be NULL.
+ (Archive::read_symbols): Pass NULL to get_elf_object_for_member.
+ (Archive::include_member): Pass NULL to get_elf_object_for_member
+ if we searched for the archive and this is the first included
+ object.
+
+2010-12-01 Ian Lance Taylor <iant@google.com>
+
+ * dwarf_reader.h (class Sized_dwarf_line_info): Add
+ track_relocs_type_ field.
+ * dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info):
+ Set track_relocs_type_.
+ (Sized_dwarf_line_info::process_one_opcode): Ignore the section
+ contents when using RELA relocs.
+ (Sized_dwarf_line_info::read_relocs): Add the reloc addend to
+ reloc_map_.
+ * reloc.cc (Track_relocs::next_addend): New function.
+ * reloc.h (class Track_relocs): Declare next_addend.
+
+2010-12-01 Ian Lance Taylor <iant@google.com>
+
+ * testsuite/icf_virtual_function_folding_test.cc (class Bar): Add
+ virtual destructor.
+
+2010-12-01 Ian Lance Taylor <iant@google.com>
+
+ * README: Update compilers known to work and fail.
+
+2010-11-23 Matthias Klose <doko@ubuntu.com>
+
+ * configure.in: For --enable-gold, handle value `default' instead of
+ `both*'. Always install ld as ld.bfd, install as ld if gold is
+ not the default.
+ * configure: Regenerate.
+
+2010-11-18 Doug Kwan <dougkwan@google.com>
+
+ * expression.cc (BINARY_EXPRESSION): Initialize left_alignment
+ and right_alignment to be zero. Store result alignment only if it is
+ greater than existing alignment.
+
+2010-11-16 Cary Coutant <ccoutant@google.com>
+
+ PR gold/12220
+ * dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info):
+ Check for ".zdebug_line".
+
+2010-11-16 Doug Kwan <dougkwan@google.com>
+ Cary Coutant <ccoutant@google.com>
+
+ * output.h (Output_segment::set_section_addresses): Pass increase_relro
+ by reference; adjust all callers.
+ * output.cc (Output_segment::set_section_addresses): Adjust references
+ to increase_relro. Add padding to *increase_relro when ORDER_RELRO_LAST
+ list is empty.
+ (Output_segment::set_offset): Assert if PT_GNU_RELRO segment does not
+ end at page boundary.
+
+2010-11-16 Cary Coutant <ccoutant@google.com>
+
+ PR gold/12220
+ * layout.cc (Layout::choose_output_section): Transform names of
+ compressed sections even when using a script with a SECTIONS clause.
+ (Layout::output_section_name): Remove code to transform
+ compressed debug section names.
+ * output.cc (Output_section::add_input_section): Use uncompressed
+ section size when tracking input sections.
+
+2010-11-11 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * symtab.h (Symbol::NON_PIC_REF): Remove.
+ (Symbol::RELATIVE_REF, Symbol::TLS_REF): New Reference_flags.
+ (Symbol::FUNCTION_CALL): Renumber. Reword comment.
+ (Symbol::needs_dynamic_reloc): Don't check NON_PIC_REF.
+ (Symbol::use_plt_offset): Take a flags argument and pass it
+ directly to needs_dynamic_reloc. Restrict check for undefined
+ weak symbols to function calls.
+ * arm.cc (Target_arm::Scan::get_reference_flags): New function.
+ (Target_arm::Scan::global): Use it.
+ (Target_arm::Scan::scan_reloc_for_stub): Likewise.
+ (Target_arm::Relocate::relocate): Likewise.
+ (Target_arm::Relocate::should_apply_static_reloc): Replace flags
+ parameter with an r_type parameter. Use get_reference_flags
+ to get the flags.
+ (Target_arm::Relocate::relocate): Update accordingly.
+ * i386.cc (Target_i386::Scan::get_reference_flags): New function.
+ (Target_i386::Scan::reloc_needs_plt_for_ifunc): Use it.
+ (Target_i386::Scan::global): Likewise.
+ (Target_i386::Relocate::relocate): Likewise.
+ (Target_i386::Relocate::should_apply_static_reloc): Replace flags
+ parameter with an r_type parameter. Use get_reference_flags
+ to get the flags.
+ (Target_i386::Relocate::relocate): Update accordingly.
+ * powerpc.cc (Target_powerpc::Scan::get_reference_flags): New function.
+ (Target_powerpc::Scan::global): Use it.
+ (Target_powerpc::Scan::scan_reloc_for_stub): Likewise.
+ (Target_powerpc::Relocate::relocate): Likewise.
+ * sparc.cc (Target_sparc::Scan::get_reference_flags): New function.
+ (Target_sparc::Scan::global): Use it.
+ (Target_sparc::Scan::scan_reloc_for_stub): Likewise.
+ (Target_sparc::Relocate::relocate): Likewise.
+ * x86_64.cc (Target_x86_64::Scan::get_reference_flags): New function.
+ (Target_x86_64::Scan::reloc_needs_plt_for_ifunc): Use it.
+ (Target_x86_64::Scan::global): Likewise.
+ (Target_x86_64::Relocate::relocate): Likewise.
+
+2010-11-08 Doug Kwan <dougkwan@google.com>
+ Cary Coutant <ccoutant@google.com>
+
+ * arm.cc (Arm_exidx_merge_section::build_contents): New method.
+ (Arm_exidx_merge_section::section_contents_): New data member.
+ (Arm_input_section::Arm_input_section): Initialize original_contents_.
+ (Arm_input_section::~Arm_input_section): De-allocate memory.
+ (Arm_input_section::original_contents_): New data member.
+ (Arm_exidx_fixup::process_exidx_section): Pass EXIDX section contents
+ in parameters instead of calling Object::section_contents without
+ locking.
+ (Arm_output_section::group_section): New parameter TASK. Pass it
+ to callees that need locking objects.
+ (Arm_output_section::fix_exidx_coverage): New parameter TASK. Use it
+ to lock EXIDX input sections. Fix a formatting issue. Call
+ Arm_exidx_merged_section::build_contents to create merged section
+ contents.
+ (Arm_output_section::create_stub_group): New parameter TASK. Use it
+ to lock object of stub table owner.
+ (Arm_exidx_input_section::Arm_exidx_input_section): Add new parameter
+ TEXT_SIZE to initialize data member TEXT_SIZE_.
+ (Arm_exidx_input_section::addralign): Fix typo in comment.
+ (Arm_exidx_input_section::text_size): New method.
+ (Target_arm::do_relax): New parameter TASK. Pass it to callees
+ that require locking objects. Lock objects before scanning for stubs
+ and updating local symbols.
+ (Arm_input_section<big_endian>::init): Copy contents of original
+ input section.
+ (Arm_input_section<big_endian>::do_write): Use saved contents of
+ original input section instead of calling Object::section_contents
+ without locking.
+ (Arm_exidx_cantunwind::do_fixed_endian_write): Find out text section
+ size without calling Object::section_size().
+ (Arm_exidx_merged_section::Arm_exidx_merged_section): Add sanity check
+ for size. Allocate a buffer for merged EXIDX entries.
+ (Arm_exidx_merged_section::build_contents): New method.
+ (Arm_exidx_merged_section::do_write): Move merge section contents
+ building code to Arm_exidx_merged_section::build_contetns. Write
+ out contetns in buffer instead of building it on the fly.
+ (Arm_relobj::make_exidx_input_section): Also pass text section size
+ to Arm_exidx_input_section constructor.
+ (Arm_relobj::do_read_symbols): Fix memory leak. Fix a formatting issue.
+ (Arm_dynobj::do_read_symbols): Fix memory leak.
+ * layout.cc (Layout::finalize): Pass TASK to Target::relax().
+ * target.h: (class Task): Add forward declaration.
+ (Target::relax): Add new parameter TASK and pass it to
+ Target::do_relax().
+ (Target::do_relax):: New parameter TASK. Fix a formatting issue.
+
+2010-11-05 Cary Coutant <ccoutant@google.com>
+
+ PR gold/10708
+ * copy-relocs.cc (Copy_relocs::emit_copy_reloc): Hold a lock on the
+ object when reading from the file.
+ * gold.cc (queue_middle_tasks): Hold a lock on the object when doing
+ second layout pass.
+ * icf.cc (preprocess_for_unique_sections): Hold a lock on the object
+ when reading section contents.
+ (get_section_contents): Likewise.
+ (icf::find_identical_sections): Likewise.
+ * mapfile.cc (Mapfile::print_discarded_sections): Hold a lock on the
+ object when reading from the file.
+ * plugin.cc (Plugin_manager::layout_deferred_objects): Hold a lock on
+ the object when doing deferred section layout.
+
+2010-11-03 Nick Clifton <nickc@redhat.com>
+
+ PR gold/12001
+ * script.h (class Symbol_assignment: name): New member. Returns
+ the name of the symbol.
+ * scrfipt.cc (Script_options::is_pending_assignment): New member.
+ Returns true if the given symbol name is on the list of
+ assignments wating to be processed.
+ * archive.cc (should_incldue_member): If the symbol is undefined,
+ check to see if it is on the list of symbols pending assignment.
+
+2010-11-03 Ryan Mansfield <rmansfield@qnx.com>
+
+ * script-sections.cc (Script_sections::find_memory_region): Check
+ for a NULL output section pointer.
+
+2010-10-29 Doug Kwan <dougkwan@google.com>
+
+ * arm.cc (Arm_outout_section::fix_exidx_coverage): Adjust call to
+ Output_section::add_relaxed_input_section.
+ * output.cc (Output_section::add_relaxed_input_section): Add new
+ arguments LAYOUT and NAME. Set section order index.
+ (Output_section::convert_input_sections_in_list_to_relaxed_sections):
+ Copy section order index.
+ * output.h (Output_section::add_relaxed_input_section): Add new
+ arguments LAYOUT and NAME.
+
+2010-10-29 Viktor Kutuzov <vkutuzov@accesssoftek.com>
+
+ * testsuite/Makefile.am: Move gcctestdir/ld rule to
+ NATIVE_OR_CROSS_LINKER.
+ * testsuite/Makefile.in: Regenerate.
+
+2010-10-20 Doug Kwan <dougkwan@google.com>
+
+ * arm.cc (Arm_relobj::do_read_symbols): Warn about ARM EXIDX sections
+ without SHF_LINK_ORDER flags.
+ * layout.cc (Layout::choose_output_section): Do not filter
+ SHF_LINK_ORDER flag in a relocatable link.
+
+2010-10-17 Cary Coutant <ccoutant@google.com>
+
+ * output.h (Output_segment::set_section_addresses): Change function
+ signature. Update all callers.
+ * output.cc (Output_segment::is_first_section_relro): Ignore TLS
+ sections.
+ (Output_segment::set_section_addresses): Align after last TLS
+ section. Add padding before last relro section instead of after.
+
+2010-10-17 Doug Kwan <dougkwan@google.com>
+
+ * gold/arm.cc (Target_arm::got_section): Use correct order and set
+ GOT output section to be writable.
+
+2010-10-14 Cary Coutant <ccoutant@google.com>
+
+ * debug.h (DEBUG_INCREMENTAL): New flag.
+ (debug_string_to_enum): Add DEBUG_INCREMENTAL).
+ * gold.cc (queue_initial_tasks): Check parameters for incremental link
+ mode.
+ * incremental.cc (report_command_line): Ignore all forms of
+ --incremental.
+ * layout.cc (Layout::Layout): Check parameters for incremental link
+ mode.
+ * options.cc (General_options::parse_incremental): New function.
+ (General_options::parse_no_incremental): New function.
+ (General_options::parse_incremental_full): New function.
+ (General_options::parse_incremental_update): New function.
+ (General_options::incremental_mode_): New data member.
+ (General_options::finalize): Check incremental_mode_.
+ * options.h (General_options): Update help text for --incremental.
+ Add --no-incremental, --incremental-full, --incremental-update.
+ (General_options::Incremental_mode): New enum type.
+ (General_options::incremental_mode): New function.
+ (General_options::incremental_mode_): New data member.
+ * parameters.cc (Parameters::incremental_mode_): New data member.
+ (Parameters::set_options): Set incremental_mode_.
+ (Parameters::set_incremental_full): New function.
+ (Parameters::incremental): New function.
+ (Parameters::incremental_update): New function.
+ (set_parameters_incremental_full): New function.
+ * parameters.h (Parameters::set_incremental_full): New function.
+ (Parameters::incremental): New function.
+ (Parameters::incremental_update): New function.
+ (Parameters::incremental_mode_): New data member.
+ (set_parameters_incremental_full): New function.
+ * plugin.cc (Plugin_manager::add_input_file): Check parameters for
+ incremental link mode.
+ * reloc.cc (Sized_relobj::do_read_relocs): Likewise.
+ (Sized_relobj::do_relocate_sections): Likewise.
+ * testsuite/Makefile.am (incremental_test): Use --incremental-full
+ option.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/incremental_test.sh: Filter all forms of --incremental.
+
+2010-10-12 Viktor Kutuzov <vkutuzov@accesssoftek.com>
+
+ * script-sections.h (class Script_sections): Make
+ Sections_elements typedef public.
+ * script-sections.cc (class Sort_output_sections): Add elements_
+ field. Add constructor which sets it; change all callers.
+ (Sort_output_sections::is_before): New function.
+ (Sort_output_sections::operator()): Call is_before.
+ * configure.ac (NATIVE_OR_CROSS_LINKER): New automake
+ conditional.
+ * testsuite/script_test_10.sh: New test. Test script section
+ order.
+ * testsuite/script_test_10.t: Likewise.
+ * testsuite/script_test_10.s: Likewise.
+ * testsuite/Makefile.am: Wrap the cross linker tests and the
+ common tests into NATIVE_OR_CROSS_LINKER.
+ (check_SCRIPTS): Add script_test_10.sh.
+ (check_DATA): Add script_test_10.stdout.
+ (script_test_10.o, script_test_10): New targets.
+ (script_test_10.stdout): New target.
+ * configure, testsuite/Makefile.in: Regenerate.
+
+2010-10-12 Viktor Kutuzov <vkutuzov@accesssoftek.com>
+
+ * arm.cc (Target_arm::Scan::local): Report the unsupported reloc
+ error for the deprecated relocations.
+ (Target_arm::Scan::global): Likewise.
+ (Target_arm::Relocate::relocate): Likewise.
+
+2010-10-12 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * fileread.cc (Input_file::find_file): Initialize *found_name
+ and *namep when using the fallback search for case 4.
+
+2010-10-11 Cary Coutant <ccoutant@google.com>
+
+ * options.h (class General_options): Redefine -z lazy as an alias for
+ the negation of -z now.
+
+2010-10-11 Ian Lance Taylor <iant@google.com>
+
+ * resolve.cc (symbol_to_bits): Report the value of the unsupported
+ binding.
+
+2010-10-06 Nick Clifton <nickc@redhat.com>
+
+ * script-sections.cc(class Memory_region): Remove
+ current_lma_offset_ field. Rename current_vma_offset_ to
+ current_offset_. Add last_section_ field.
+ (Memory_region::get_current_vma_address): Rename to
+ get_current_address.
+ (Memory_region::get_current_lma_address): Delete.
+ (Memory_region::increment_vma_offset): Rename to
+ increment_offset.
+ (Memory_region::increment_lma_offset): Delete.
+ (Memory_region::attributes_compatible): New method. Returns
+ true if the provided section is compatible with the region.
+ (Memory_region::get_last_section): New method. Returns the last
+ section to use the region.
+ (Memory_region::set_last_section): New method. Stores the last
+ section to use the region.
+ (Script_sections::block_in_region): New method. Returns true if
+ a block of memory is contained within a region.
+ (Script_sections::find_memory_region): New method. Locates a
+ memory region to be used to set a VMA or LMA address.
+ (Output_section_definition::set_section_addresses): Add code to
+ check for addresses set by memory regions.
+ (Output_segment::set_section_addresses): Remove memory region
+ walking code.
+ (Script_sections::create_segment): Add a warning if a header
+ segment is created outside of any region.
+ * script-sections.h (class Script_sections): Add prototypes for
+ find_memory_region and block_in_region methods.
+ * testsuite/memory_test.s: Use .long instead of .word.
+ * testsuite/memory_test.t: Add some more output sections.
+ * testsuite/memory_test.sh: Update expected output.
+
+2010-10-02 Doug Kwan <dougkwan@google.com>
+
+ * symtab.cc (Symbol_table::Symbol_table_hash::operator()): Move
+ defintion to symtab.h
+ * symtab.h (Symbol_table::Symbol_table_hash::operator()): Change
+ declaration to defintion.
+
+2010-10-01 Nick Clifton <nickc@redhat.com>
+
+ * expression.cc (eval): Replace dummy argument with NULL.
+ (eval_maybe_dot): Check for a NULL result section pointer.
+ (Symbol_expression::value): Likewise.
+ (Dot_expression::value): Likewise.
+ (BINARY_EXPRESSION): Likewise.
+ (Max_expression::value): Likewise.
+ (Min_expression::value): Likewise.
+ (Absolute_expression::value): Likewise.
+ (Addr_expression::value_from_output_section): Likewise.
+ (Loaddddr_expression::value_from_output_section): Likewise.
+ (Segment_start_expression::value): Likewise.
+ * script-sections.cc
+ (Sections_elememt_dot_assignment::finalize_symbols): Replace dummy
+ argument with NULL.
+ (Sections_elememt_dot_assignment::set_section_addresses):
+ Likewise.
+ (Output_data_expression::do_write_to_buffer): Likewise.
+ (Output_section_definition::finalize_symbols): Likewise.
+ (Output_section_definition::set_section_addresses): Likewise.
+
+2010-09-30 Doug Kwan <dougkwan@google.com>
+
+ * gold/testsuite/arm_branch_out_of_range.sh: Fix broken tests.
+
+2010-09-28 Sriraman Tallam <tmsriram@google.com>
+
+ * target.h (Target::can_icf_inline_merge_sections): New virtual
+ function.
+ * x86_64.cc (Target__x86_64::can_icf_inline_merge_sections): New
+ virtual function.
+ * i386.cc (Target_i386::can_icf_inline_merge_sections): New
+ virtual function.
+ * icf.cc (get_section_contents): Inline merge sections only when
+ target allows it.
+
+2010-09-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * configure: Regenerate.
+
+2010-09-17 Ian Lance Taylor <iant@google.com>
+
+ * testsuite/memory_test.sh: Adjust for change of 2010-09-10.
+ * testsuite/Makefile.am (memory_test.o): New target.
+ (memory_test): Depend on memory_test.o, gcctestdir/ld, and
+ memory_test.t.
+ * testsuite/Makefile.in: Rebuild.
+
+2010-09-17 Doug Kwan <dougkwan@google.com>
+
+ * arm.cc (Target_arm::Relocate::relocate): Ignore symbol type and
+ defintion if relocation uses GOT entries of the symbol.
+ * testsuite/icf_safe_test.sh: Fix test.
+ * testsuite/icf_safe_so_test.sh: Fix test.
+
+2010-09-16 Cary Coutant <ccoutant@google.com>
+
+ * script_sections.cc (class Memory_region): Remove "NULL" from
+ vector initializations.
+
+2010-09-15 Cary Coutant <ccoutant@google.com>
+
+ * incremental.cc (Output_section_incremental_inputs::write_info_blocks):
+ Resolve forwarding symbols.
+
+2010-09-15 Doug Kwan <dougkwan@google.com>
+
+ * gold/testsuite/script_test_3.t: Add ARM special sections.
+ * gold/testsuite/script_test_4.t: Same.
+ * gold/testsuite/script_test_5.t: Same.
+ * gold/testsuite/script_test_6.t: Same.
+ * gold/testsuite/script_test_7.t: Same.
+ * gold/testsuite/script_test_7.t: Same.
+ * gold/testsuite/thumb_blx_out_of_range.s: Fix instruction alignment.
+
+2010-09-14 Cary Coutant <ccoutant@google.com>
+
+ * x86_64.cc (Target_x86_64::saw_tls_block_reloc_): Remove member.
+ (Target_x86_64::Relocate::relocate_tls): Replace check for
+ saw_tls_block_reloc_ with test for executable section.
+
+2010-09-12 Cary Coutant <ccoutant@google.com>
+
+ * symtab.h (Symbol::needs_dynamic_reloc): Non-PIC calls from
+ position-independent executables to shared libraries need dynamic
+ relocations.
+ (Symbol::may_need_copy_reloc): Do not generate COPY relocs in
+ position-independent executables.
+ * testsuite/Makefile.am (two_file_mixed_pie_test): New test.
+ * testsuite/Makefile.in: Regenerate.
+
+2010-09-10 Nick Clifton <nickc@redhat.com>
+
+ PR gold/11997
+ * testsuite/memory_test.t: Discard any sections that are not
+ needed.
+
+2010-09-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gold/11996
+ * object.cc (Sized_relobj::do_finalize_local_symbols): Remove
+ "This::" to work around a bug in gcc 4.2.
+
+ * testsuite/ifuncmain7.c (foo_ifunc): Add __attribute__ ((used)).
+
+2010-09-09 Rafael Espindola <espindola@google.com>
+
+ * layout.cc (Layout::attach_allocated_section_to_segment): Don't put
+ sections with different PF_X flags in the same segment.
+ (Layout::find_first_load_seg): Search all segments to find the first
+ one.
+ * options.h (rosegment): New.
+
+2010-09-08 Rafael Espindola <espindola@google.com>
+
+ * layout.cc (Layout::set_segment_offsets): Always advance to a new page.
+
+2010-09-08 Doug Kwan <dougkwan@google.com>
+
+ * arm.cc (Arm_exidx_cantunwind::do_print_to_mapfile): New method.
+ (Arm_relobj::do_relocate_sections): Add new parameter for output
+ file to match the parent.
+ (Target_arm::scan_reloc_section_for_stubs): Use would-be final values
+ of local symbols instead of input values. Update code to track
+ changes in gold::relocate_section.
+ * object.cc (Sized_relobj::compute_final_local_value): New methods.
+ (Sized_relobj::compute_final_local_value_internal): New methods.
+ (Sized_relobj::do_finalize_local_symbols): Move code from loop
+ body into private version of Sized_relobj::compute_final_local_value.
+ Call the inline method.
+ * object.h (Symbol_value::Symbol_value): Define destructor. Free
+ merged symbol value if there is one.
+ (Symbol_value::has_output_value): New method defintiion.
+ (Sized_relobj::Compute_final_local_value_status): New enum type.
+ (Sized_relobj::compute_final_local_value): New methods.
+ (Sized_relobj::compute_final_local_value_internal): New methods.
+ * Makefile.am (check_SCRIPTS): Add arm_branch_out_of_range.sh
+ and arm_cortex_a8.sh.
+ (thumb_bl_out_of_range_local, arm_cortex_a8_b_cond, arm_cortex_a8_bl,
+ arm_cortex_a8_blx, arm_cortex_a8_local, arm_corte_a8_local_reloc):
+ New tests.
+ * Makefile.in: Regenerate.
+ * testsuite/arm_bl_out_of_range.s: Update test.
+ * testsuite/thumb_bl_out_of_range.s: Ditto.
+ * testsuite/thumb_blx_out_of_range.s: Ditto.
+ * testsuite/arm_branch_out_of_range.sh: New file.
+ * testsuite/arm_cortex_a8.sh: Ditto.
+ * testsuite/arm_cortex_a8_b.s: Ditto.
+ * testsuite/arm_cortex_a8_b_cond.s: Ditto.
+ * testsuite/arm_cortex_a8_b_local.s: Ditto.
+ * testsuite/arm_cortex_a8_bl.s: Ditto.
+ * testsuite/arm_cortex_a8_blx.s: Ditto.
+ * testsuite/arm_cortex_a8_local.s: Ditto.
+ * testsuite/arm_cortex_a8_local_reloc.s: Ditto.
+ * testsuite/thumb_bl_out_of_range_local.s: Ditto.
+
+2010-09-08 Rafael Espindola <espindola@google.com>
+
+ * Makefile.am (memory_test.stdout): Run readelf with -W.
+ * Makefile.in: Regenerate.
+ * testsuite/memory_test.sh: Make the regexps accept both 32 and
+ 64 bit output.
+
+2010-09-08 Rafael Espindola <espindola@google.com>
+
+ * script-sections.cc (Script_sections::add_memory_region): Convert
+ field precision to int.
+ * script.cc (script_set_section_region, script_set_section_region):
+ Convert field precision to int.
+
2010-09-08 Rafael Espindola <espindola@google.com>
* arm.cc (do_finalize_sections): Create the __exidx_start and