2009-10-09 Doug Kwan <dougkwan@google.com>
[deliverable/binutils-gdb.git] / gold / ChangeLog
index 00f8464d4aebc169c24b426d5dc78e3ed93d137c..2b31fa68334816277fded54ef85a4bd633f3f539 100644 (file)
+2009-10-09  Doug Kwan  <dougkwan@google.com>
+
+       * layout.cc (Layout::make_output_section): Call target hook to make
+       ordinary output section.
+       (Layout::finalize): Adjust parameter list of call the
+       Target::may_relax().
+       * layout.h (class Layout::section_list): New method.
+       * merge.h (Output_merge_base::entsize): Change visibility to public.
+       (Output_merge_base::is_string, Output_merge_base::do_is_string):
+       New methods.
+       (Output_merge_string::do_is_string): New method.
+       * object.cc (Sized_relobj::do_setup): renamed from
+       Sized_relobj::set_up.
+       * object.h (Sized_relobj::adjust_shndx,
+       Sized_relobj::initializ_input_to_output_maps,
+       Sized_relobj::free_input_to_output_maps): Change visibilities to
+       protected.
+       (Sized_relobj::setup): Virtualize.
+       (Sized_relobj::do_setup): New method declaration.
+       (Sized_relobj::invalidate_section_offset,
+       Sized_relobj::do_invalidate_section_offset): New method decfinitions.
+       (Sized_relobj::elf_file, Sized_relobj::local_values): New methods.
+       * options.cc (parse_int): New function.
+       * options.h (parse_int): New declaration.
+       (DEFINE_int): New macro.
+       (stub_group_size): New option.
+       * output.cc (Output_section::Output_section): Initialize memebers
+       merge_section_map_, merge_section_by_properties_map_,
+       relaxed_input_section_map_, is_relaxed_input_section_map_valid_.
+       (Output_section::add_input_section): Handled deferred code-fill
+       generation and remove an old comment.
+       (Output_section::add_relaxed_input_section): New method definition.
+       (Output_section::add_merge_input_section): Use merge section by
+       properties map to speed to search.  Update merge section maps
+       as appropriate.
+       (Output_section::build_relaxation_map): New method definition.
+       (Output_section::convert_input_sections_in_list_to_relaxed_sections):
+       Same.
+       (Output_section::relax_input_section): Renamed to
+       Output_section::convert_input_sections_to_relaxed_sections and change
+       interface to take a vector of pointers to relaxed sections.
+       (Output_section::find_merge_section,
+       Output_section::find_relaxed_input_section): New method definitions.
+       (Output_section::is_input_address_mapped,
+       Output_section::output_offset, Output_section::output_address):
+       Use output section data maps to speed up searching.
+       (Output_section::find_starting_output_address): Add comments.
+       (Output_section::do_write,
+       Output_section::write_to_postprocessing_buffer): Do code-fill
+       generation as appropriate.
+       (Output_section::get_input_sections): Invalidate relaxed input section
+       map.
+       (Output_section::restore_states): Adjust type of checkpoint .
+       Invalidate relaxed input section map.
+       * output.h (Output_merge_base): New class declaration.
+       (Input_section_specifier): New class defintion.
+       (class Output_relaxed_input_section) Change base class to
+       Output_section_data_build.
+       (Output_relaxed_input_section::Output_relaxed_input_section): Adjust
+       base class initializer.
+       (Output_section::add_relaxed_input_section): New method declaration.
+       (Output_section::Input_section): Change visibility to protected.
+       (Output_section::Input_section::relobj,
+       Output_section::Input_section::shndx): Handle relaxed input sections.
+       Output_section::input_sections) Change visibility to protected.  Also
+       define overload to return a non-const pointer.
+       (Output_section::Merge_section_properties): New class defintion.
+       (Output_section::Merge_section_by_properties_map,
+       Output_section::Output_section_data_by_input_section_map,
+       Output_section::Relaxation_map): New types.
+       (Output_section::relax_input_section): Rename method to
+       Output_section::convert_input_sections_to_relaxed_sections and change
+       interface to take a vector of relaxed section pointers.
+       (Output_section::find_merge_section,
+       Output_section::find_relaxed_input_section,
+       Output_section::build_relaxation_map,
+       Output_section::convert_input_sections_in_list_to_relaxed_sections):
+       New method declarations.
+       (Output_section::merge_section_map_
+       Output_section::merge_section_by_properties_map_,
+       Output_section::relaxed_input_section_map_,
+       Output_section::is_relaxed_input_section_map_valid_,
+       Output_section::generate_code_fills_at_write_): New data members.
+       * script-sections.cc
+       (Output_section_element_input::set_section_addresses): Call
+       current_data_size and addralign methods of relaxed input sections.
+       (Orphan_output_section::set_section_addresses): Call current_data_size
+       and addralign methods of relaxed input sections.
+       * symtab.cc (Symbol_table::compute_final_value): Extract template
+       from the body of Symbol_table::sized_finalize_symbol.
+       (Symbol_table::sized_finalized_symbol): Call
+       Symbol_table::compute_final_value.
+       * symtab.h (Symbol_table::Compute_final_value_status): New enum type.
+       (Symbol_table::compute_final_value): New templated method declaration.
+       * target.cc (Target::do_make_output_section): New method defintion.
+       * target.h (Target::make_output_section): New method declaration.
+       (Target::relax): Add more parameters for input objects, symbol table
+       and layout.  Adjust call to do_relax.
+       (Target::do_make_output_section): New method declaration.
+       (Target::do_relax): Add parameters for input objects, symbol table
+       and layout.
+
+2009-10-09  Andrew Pinski  <andrew_pinski@playstation.sony.com>
+
+       * pread.c: Include stdio.h.
+
+2009-10-09  Andrew Pinski  <andrew_pinski@playstation.sony.com>
+
+       * plugin.cc: Don't include dlfcn.h when ENABLE_PLUGINS is not
+       defined.
+
+2009-10-09  Andrew Pinski  <andrew_pinski@playstation.sony.com>
+
+       * dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info):
+       Change read_shndx type to unsigned int.
+       (Sized_dwarf_line_info::read_lines): Change shndx type to unsigned
+       int.
+       (Sized_dwarf_line_info::read_line_mappings): Likewise.
+       * dwarf_reader.h (Sized_dwarf_line_info::Sized_dwarf_line_info):
+       Change read_shndx type to unsigned int.
+       (Sized_dwarf_line_info::read_lines): Change shndx type to unsigned
+       int.
+       (Sized_dwarf_line_info::read_line_mappings): Likewise.
+       * layout.cc (Layout::create_symtab_sections): Cast the result of
+       local_symcount * symsize to off_t in the gold_assert.
+
+2009-10-09  Viktor Kutuzov  <vkutuzov@accesssoftek.com>
+
+       * arm.cc (Target_arm::relocate::reloc_is_non_pic): Return true for
+       R_ARM_THM_ABS5, R_ARM_ABS8, R_ARM_ABS12, R_ARM_ABS16,
+       R_ARM_BASE_ABS.
+       (Arm_relocate_functions::abs8): Remove has_thumb_bit parameter.
+       (Arm_relocate_functions::thm_abs5): New function.
+       (Arm_relocate_functions::abs12): New function.
+       (Arm_relocate_functions::abs16): New function.
+       (Arm_relocate_functions::base_abs): New function.
+       (Scan::check_non_pic): Handle R_ARM_ABS32_NOI.
+       (Scan::local): Remove special handling of R_ARM_ABS8.  Handle
+       R_ARM_ABS32_NOI, R_ARM_THM_ABS5, R_ARM_ABS12, R_ARM_ABS16, and
+       R_ARM_BASE_ABS.
+       (Scan::global): Likewise.
+       (Relocate::relocate): Handle R_ARM_ABS12, R_ARM_ABS16,
+       R_ARM_ABS32_NOI, R_ARM_THM_ABS5, and R_ARM_BASE_ABS.
+       (Relocatable_size_for_reloc::get_size_for_reloc): Handle
+       R_ARM_ABS16, R_ARM_THM_ABS5, R_ARM_ABS32_NOI, R_ARM_ABS12, and
+       R_ARM_BASE_ABS.
+
+2009-10-09  Viktor Kutuzov  <vkutuzov@accesssoftek.com>
+
+       * arm.cc (Arm_relocate_functions::movw_prel_nc): New function.
+       (Arm_relocate_functions::movt_prel): New function.
+       (Arm_relocate_functions::thm_movw_prel_nc): New function.
+       (Arm_relocate_functions::thm_movt_prel): New function.
+       (Scan::local): Handle R_ARM_MOVW_PREL_NC, R_ARM_MOVT_PREL,
+       R_ARM_THM_MOVW_PREL_NC, and R_ARM_THM_MOVT_PREL.
+       (Scan::global, Relocate::relocate): Likewise.
+       (Relocatable_size_for_reloc::get_size_for_reloc): Likewise.
+
+2009-10-09  Mikolaj Zalewski  <mikolajz@google.com>
+
+       * gold.cc: (queue_initial_tasks): Pass incremental_inputs to
+       Incremental_checker.
+       * incremental.cc: (INCREMENTAL_LINK_VERSION): Change type to
+       unsigned int.
+       (class Incremental_inputs_header): New class.
+       (Incremental_inputs_header_writer): Edit comment.
+       (Incremental_inputs_entry): New class.
+       (Incremental_inputs_entry_writer): Edit comment.
+       (Sized_incremental_binary::do_find_incremental_inputs_section):
+       Add *strtab_shndx parameter, fill it.
+       (Sized_incremental_binary::do_check_inputs): New method.
+       (Incremental_checker::can_incrementally_link_output_file): Use
+       Sized_incremental_binary::check_inputs.
+       (Incremental_inputs::report_command_line): Save command line in
+       command_line_.
+       * incremental.h:
+       (Incremental_binary::find_incremental_inputs_section): New
+       method.
+       (Incremental_binary::do_find_incremental_inputs_section): Add
+       strtab_shndx parameter.
+       (Incremental_binary::do_check_inputs): New pure virtual method.
+       (Sized_incremental_binary::do_check_inputs): Declare.
+       (Incremental_checker::Incremental_checker): Add incremental_inputs
+       parameter, use it to initialize incremental_inputs_.
+       (Incremental_checker::incremental_inputs_): New field.
+       (Incremental_checker::command_line): New method.
+       (Incremental_checker::inputs): New method.
+       (Incremental_checker::command_line_): New field.
+
+2009-10-09  Mikolaj Zalewski  <mikolajz@google.com>
+
+       * incremental.cc: Include <cstdarg> and "target-select.h".
+       (vexplain_no_incremental): New function.
+       (explain_no_incremental): New function.
+       (Incremental_binary::error): New method.
+       (Sized_incremental_binary::do_find_incremental_inputs_section): New
+       method.
+       (make_sized_incremental_binary): New function.
+       (open_incremental_binary): New function.
+       (can_incrementally_link_file): Add checks if output is ELF and has
+       inputs section.
+       * incremental.h: Include "elfcpp_file.h" and "output.h".
+       (Incremental_binary): New class.
+       (Sized_incremental_binary): New class.
+       (open_incremental_binary): Declare.
+       * object.cc (is_elf_object): Use
+       elfcpp::Elf_recognizer::is_elf_file.
+       (make_elf_object): Use elfcpp::Elf_recognizer::is_valid_header.
+       * output.h (Output_file::filesize): New method.
+
+2009-10-07  Viktor Kutuzov  <vkutuzov@accesssoftek.com>
+
+       * arm.cc (Arm_relocate_functions::extract_arm_movw_movt_addend):
+       New function.
+       (Arm_relocate_functions::insert_val_arm_movw_movt): New function.
+       (Arm_relocate_functions::extract_thumb_movw_movt_addend): New
+       function.
+       (Arm_relocate_functions::insert_val_thumb_movw_movt): New
+       function.
+       (Arm_relocate_functions::movw_abs_nc): New function.
+       (Arm_relocate_functions::movt_abs): New function.
+       (Arm_relocate_functions::thm_movw_abs_nc): New function.
+       (Arm_relocate_functions::thm_movt_abs): New function.
+       (Scan::local): Handle R_ARM_MOVW_ABS_NC, R_ARM_MOVT_ABS,
+       R_ARM_THM_MOVW_ABS_NC, R_ARM_THM_MOVT_ABS.
+       (Scan::global): Likewise.
+       (Relocate::relocate): Likewise.
+       (Relocatable_size_for_reloc::get_size_for_reloc): Likewise.
+
+2009-10-07  Viktor Kutuzov  <vkutuzov@accesssoftek.com>
+
+       * arm.cc (Arm_relocate_functions::got_prel) New function.
+       (Scan::local, Scan::global): Handle R_ARM_GOT_PREL.
+       (Relocate::relocate): Likewise.
+       (Relocatable_size_for_reloc::get_size_for_reloc): Likewise.
+
+2009-10-06  Ian Lance Taylor  <iant@google.com>
+
+       * options.h (class General_options): Define
+       split_stack_adjust_size parameter.
+       * object.h (class Object): Add uses_split_stack_ and
+       has_no_split_stack_ fields.  Add uses_split_stack and
+       has_no_split_stack accessor functions.  Declare
+       handle_split_stack_section.
+       (class Reloc_symbol_changes): Define.
+       (class Sized_relobj): Define Function_offsets.  Declare
+       split_stack_adjust, split_stack_adjust_reltype, and
+       find_functions.
+       * object.cc (Object::handle_split_stack_section): New function.
+       (Sized_relobj::do_layout): Call handle_split_stack_section.
+       * dynobj.cc (Sized_dynobj::do_layout): Call
+       handle_split_stack_section.
+       * reloc.cc (Sized_relobj::relocate_sections): Call
+       split_stack_adjust for executable sections in split_stack
+       objects.  Pass reloc_map to relocate_section.
+       (Sized_relobj::split_stack_adjust): New function.
+       (Sized_relobj::split_stack_adjust_reltype): New function.
+       (Sized_relobj::find_functions): New function.
+       * target-reloc.h: Include "object.h".
+       (relocate_section): Add reloc_symbol_changes parameter.  Change
+       all callers.
+       * target.h (class Target): Add calls_non_split method.  Declare
+       do_calls_non_split virtual method.  Declare match_view and
+       set_view_to_nop.
+       * target.cc: Include "elfcpp.h".
+       (Target::do_calls_non_split): New function.
+       (Target::match_view): New function.
+       (Target::set_view_to_nop): New function.
+       * gold.cc (queue_middle_tasks): Give an error if mixing
+       split-stack and non-split-stack objects with -r.
+       * i386.cc (Target_i386::relocate_section): Add
+       reloc_symbol_changes parameter.
+       (Target_i386::do_calls_non_split): New function.
+       * x86_64.cc (Target_x86_64::relocate_section): Add
+       reloc_symbol_changes parameter.
+       (Target_x86_64::do_calls_non_split): New function.
+       * arm.cc (Target_arm::relocate_section): Add reloc_symbol_changes
+       parameter.
+       * powerpc.cc (Target_powerpc::relocate_section): Add
+       reloc_symbol_changes parameter.
+       * sparc.cc (Target_sparc::relocate_section): Add
+       reloc_symbol_changes parameter.
+       * configure.ac: Call AM_CONDITIONAL for the default target.
+       * configure: Rebuild.
+       * testsuite/Makefile.am (TEST_AS): New variable.
+       (check_SCRIPTS): Add split_i386.sh and split_x86_64.sh.
+       (check_DATA): Add split_i386 and split_x86_64 files.
+       (SPLIT_DEFSYMS): Define.
+       (split_i386_[1234n].o): New targets.
+       (split_i386_[124]): New targets.
+       (split_i386_[1234r].stdout): New targets.
+       (split_x86_64_[1234n].o): New targets.
+       (split_x86_64_[124]): New targets.
+       (split_x86_64_[1234r].stdout): New targets.
+       (MOSTLYCLEANFILES): Add new executables.
+       * testsuite/split_i386.sh: New file.
+       * testsuite/split_x86_64.sh: New file.
+       * testsuite/split_i386_1.s: New file.
+       * testsuite/split_i386_2.s: New file.
+       * testsuite/split_i386_3.s: New file.
+       * testsuite/split_i386_4.s: New file.
+       * testsuite/split_i386_n.s: New file.
+       * testsuite/split_x86_64_1.s: New file.
+       * testsuite/split_x86_64_2.s: New file.
+       * testsuite/split_x86_64_3.s: New file.
+       * testsuite/split_x86_64_4.s: New file.
+       * testsuite/split_x86_64_n.s: New file.
+       * testsuite/testfile.cc (Target_test): Update relocation_section
+       function.
+       * testsuite/Makefile.in: Rebuild.
+
+2009-10-06  Ian Lance Taylor  <iant@google.com>
+
+       * i386.cc (class Target_i386::Relocate): Add ldo_addrs_ field.
+       (Target_i386::Relocate::relocate_tls): Call fix_up_ldo before
+       changing local_dynamic_type_ from LOCAL_DYNAMIC_NONE.  When
+       handling R_386_TLS_LDO_32, if local_dynamic_type_ is NONE, push
+       the address on ldo_addrs_.
+       (Target_i386::Relocate::fix_up_ldo): New function.
+
+2009-10-06   Rafael Espindola  <espindola@google.com>
+
+       * plugin.cc (add_input_library): New.
+       (Plugin::load): Add add_input_library to tv.
+       (Plugin_manager::add_input_file): Add the is_lib argument.
+       (add_input_file): Update call to Plugin_manager::add_input_file.
+       (add_input_library): New.
+       * plugin.h (Plugin_manager::add_input_file): Add the is_lib argument.
+
+2009-09-30  Doug Kwan  <dougkwan@google.com>
+
+       * arm.cc (Target_arm::may_need_copy_reloc): Check for THUMB function
+       symbol and call Symbol::may_need_copy_reloc to determine if
+       a copy reloc is needed.
+       * copy-relocs.cc (Copy_relocs::need_copy_reloc): Return false if -z
+       nocopyreloc is given in command line.
+       (Copy_relocs::emit_copy_reloc): Assert that -z nocopyreloc is not
+       given in command line.
+       * i386.cc (Target_i386::may_need_copy_reloc): Remove.
+       (Target_i386::Scan::global): Use Symbol::may_need_copy_reloc instead
+       of the removed Target_i386::may_need_copy_reloc.
+       * options.h (copyreloc): New option with default value false.
+       * powerpc.cc (Target_powerpc::may_need_copy_reloc): Remove.
+       (Target_powerpc::Scan::global): Use Symbol::may_need_copy_reloc
+       instead of the removed Target_powerpc::may_need_copy_reloc.
+       * sparc.cc (Target_powerpc::may_need_copy_reloc): Remove.
+       (Target_sparc::Scan::global): Use Symbol::may_need_copy_reloc
+       instead of the removed Target_sparc::may_need_copy_reloc.
+       * symtab.h (Symbol::may_need_copy_reloc): New method definition.
+       * x86_64.cc (Target_powerpc::may_need_copy_reloc): Remove.
+       (Target_x86_64::Scan::global): Use Symbol::may_need_copy_reloc
+       instead of the removed Target_x86_64::may_need_copy_reloc.
+
+2009-09-30  Ian Lance Taylor  <iant@google.com>
+
+       * object.h (class Object): Remove target_ field, and target,
+       sized_target, and set_target methods.
+       (Object::sized_target): Remove.
+       (class Sized_relobj): Update declarations.  Remove sized_target.
+       * object.cc (Sized_relobj::setup): Remove target parameter.
+       Change all callers.
+       (Input_objects::add_object): Don't do anything with the target.
+       (make_elf_sized_object): Add punconfigured parameter.  Change all
+       callers.  Set or test parameter target.
+       * dynobj.cc (Sized_dynobj::target): Remove target parameter.
+       Change all callers.
+       * parameters.cc (Parameters::set_target): Change parameter type to
+       be non-const.
+       (Parameters::default_target): Remove.
+       (set_parameters_target): Change parameter type to be non-const.
+       (parameters_force_valid_target): New function.
+       (parameters_clear_target): New function.
+       * parameters.h (class Parameters): Update declarations.  Remove
+       default_target method.  Add sized_target and clear_target
+       methods.  Change target_ to be non-const.
+       (set_parameters_target): Update declaration.
+       (parameters_force_valid_target): Declare.
+       (parameters_clear_target): Declare.
+       * readsyms.cc (Read_symbols::do_read_symbols): Pass punconfigured
+       as NULL if we aren't searching.
+       (Add_symbols::run): Don't check for compatible target.
+       * fileread.cc (Input_file::open_binary): Call
+       parameters_force_valid_target.
+       * gold.cc (queue_middle_tasks): Likewise.
+       * plugin.cc (make_sized_plugin_object): Likewise.  Don't call
+       set_target on object.
+       * dynobj.h (class Sized_dynobj): Update declarations.
+       * archive.cc (Archive::get_elf_object_for_member): Return NULL if
+       make_elf_object returns NULL.
+       (Archive::include_member): Don't check whether object target is
+       compatible.
+       * output.cc (Output_section::add_input_section): Get target from
+       parameters.
+       (Output_section::relax_input_section): Likewise.
+       * reloc.cc (Sized_relobj::do_gc_process_relocs): Get target from
+       parameters.
+       (Sized_relobj::do_scan_relocs): Likewise.
+       (Sized_relobj::relocate_sections): Likewise.
+       * resolve.cc (Symbol_table::resolve): Likewise.
+       * symtab.cc (Symbol_table::wrap_symbol): Likewise.  Remove object
+       parameter.  Change all callers.
+       (Symbol_table::add_from_object): Get target from parameters.
+       (Symbol_table::add_from_relobj): Don't check object target.
+       (Symbol_table::add_from_dynobj): Likewise.
+       (Symbol_table::define_special_symbol): Get target from
+       parameters.
+       * symtab.h (class Symbol_table): Update declaration.
+       * testsuite/binary_unittest.cc (gold_testsuite): Remove target
+       parameter.  Change all callers.  Clear parameter target.
+       (Binary_test): Test target here.
+       * testsuite/object_unittest.cc (gold_testsuite): Remove
+       target_test_pointer parameter.  Change all callers.
+       (Object_test): Test target here.
+
+2009-09-26  Ian Lance Taylor  <iant@google.com>
+
+       * testsuite/initpri1.c: Don't try to use constructor priorities if
+       compiling with gcc before 4.3.
+
+2009-09-22  Mikolaj Zalewski  <mikolajz@google.com>
+
+       * testsuite/retain_symbols_file_test.sh (check_present): Change
+       output file name to retain_symbols_file_test.stdout.
+       (check_absent): Likewise.
+
+2009-09-18  Craig Silverstein  <csilvers@google.com>
+
+       * object.cc (Sized_relobj::do_count): Test should_retain_symbol map.
+       * options.cc: Include <cerrno> and <fstream>.
+       (General_options::finalize): Parse -retain-symbols-file tag.
+       * options.h: New flag.
+       (General_options): New method should_retain_symbol, new
+       variable symbols_to_retain.
+       * symtab.cc (Symbol_table::sized_finalize_symbol): Test
+       should_retain_symbol map.
+       * testsuite/Makefile.am (retain_symbols_file_test): New test.
+       * testsuite/Makefile.in: Regenerate.
+       * testsuite/retain_symbols_file_test.sh: New file.
+
+2009-09-18  Nick Clifton  <nickc@redhat.com>
+
+       * po/es.po: Updated Spanish translation.
+
+2009-09-17  Doug Kwan  <dougkwan@google.com>
+
+       * debug.h (DEBUG_RELAXATION): New constant.
+       (DEBUG_ALL): Add DEBUG_RELAXATION.
+       (debug_string_to_enum): Add relaxation debug option.
+       * layout.cc
+       (Layout::Relaxation_debug_check::check_output_data_for_reset_values,
+       Layout::Relaxation_debug_check::read_sections,
+       Layout::Relaxation_debug_check::read_sections): New method definitions.
+       (Layout::Layout): Initialize data members
+       record_output_section_data_from_scrips_,
+       script_output_section_data_list_ and relaxation_debug_check_.
+       (Layout::save_segments, Layout::restore_segments,
+       Layout::clean_up_after_relaxation, Layout::prepare_for_relaxation,
+       Layout::relaxation_loop_body): New method definitions.
+       (Layout::finalize): Support relaxation.  Move section layout code to
+       Layout::relaxation_loop_body.
+       (Layout::set_asection_address_from_script): Move code for orphan
+       section placement out.
+       (Layout::place_orphan_sections_in_script): New method definition.
+       * layout.h (Output_segment_headers, Output_file_header):
+       New forward class declarations.
+       (Layout::~Layout): Define.
+       (Layout::new_output_section_data_from_script): New method definition.
+       (Layout::place_orphan_sections_in_script): New method declaration.
+       (Layout::Segment_states): New type declaration.
+       (Layout::save_segments, Layout::restore_segments,
+       Layout::clean_up_after_relaxation, Layout::prepare_for_relaxation,
+       Layout::relaxation_loop_body): New method declarations.
+       (Layout::Output_section_data_list): New type declaration.
+       (Layout::Relaxation_debug_check): New class definition.
+       (Layout::record_output_section_data_from_script_,
+       Layout::script_output_section_data_list_, Layout::segment_states_,
+       Layout::relaxation_debug_check_): New data members.
+       * output.cc: (Output_section_headers::do_size): New method definition.
+       (Output_section_headers::Output_section_headers): Move size
+       computation to Output_section_headers::do_size.
+       (Output_segment_headers::do_size): New method definition.
+       (Output_file_header::Output_file_header): Move size computation to 
+       Output_file_header::do_size and call it.
+       (Output_file_header::do_size): New method definition.
+       (Output_data_group::Output_data_group): Adjust call to
+       Output_section_data.
+       (Output_data_dynamic::set_final_data_size): Add DT_NULL tag only once.
+       (Output_symtab_xindex::do_write): Add array bound check.
+       (Output_section::Input_section::print_to_mapfile): Handle
+       RELAXED_INPUT_SECTION_CODE.
+       (Output_section::Output_section): Initialize data member checkpoint_.
+       (Output_section::~Output_section): Delete checkpoint object pointed
+       by checkpoint_.
+       (Output_section::add_input_section): Always add an Input_section if
+       relaxing.
+       (Output_section::add_merge_input_section): Add assert.
+       (Output_section::relax_input_section): New method definition.
+       (Output_section::set_final_data_size): Set load address to zero for
+       an unallocated section.
+       (Output_section::do_address_and_file_offset_have_reset_values):
+       New method definition.
+       (Output_section::Input_section_sort_enty::Input_section_sort_enty):
+       Handle relaxed input section.
+       (Output_section::sort_attached_input_sections): Checkpoint input
+       section list lazily.
+       (Output_section::get_input_sections): Change type of input_sections to
+       list of Simple_input_section pointers.  Checkpoint input section list
+       lazily.  Also handle relaxed input sections.
+       (Output_section::add_input_section_for_script): Take a reference to
+       a Simple_input_section object instead of Relobj pointer and section
+       index as parameter.  Handle relaxed input sections.
+       (Output_section::save_states, Output_section::restore_states): New
+       method definitions.
+       * output.h (Output_data::Output_data): Initialize is_data_size_fixed_.
+       (Output_data::is_data_size_fixed): New method definition.
+       (Output_data::reset_addresss_and_file_offset): Do not reset data size
+       if it is fixed.
+       (Output_data::address_and_file_offset_have_reset_values): New method
+       definition.
+       (Output_data::do_address_and_file_offset_have_reset_values): New method
+       definition.
+       (Output_data::set_data_size): Check that data size is not fixed.
+       (Output_data::fix_data_size): New method definition.
+       (Output_data::is_data_size_fixed_): New data member.
+       (Output_section_headers::set_final_data_size): New method definition.
+       (Output_section_headers::do_size): New method declaration.
+       (Output_segment_headers::set_final_data_size): New method definition.
+       (Output_segment_headers::do_size): New method declaration.
+       (Output_file_header::set_final_data_size)::New method definition.
+       (Output_file_header::do_size)::New method declaration.
+       (Output_section_data::Output_section_data): Add new parameter
+       is_data_size_fixed and use it to fix data size.
+       (Output_data_const::Output_data_const): Adjust call to base class
+       constructor and fix data size.
+       (Output_data_const_buffer::Output_data_const_buffer): Adjust call to
+       base class constructor and fix data size.
+       (Output_data_fixed_space::Output_data_fixed_space): Adjust call to
+       base class constructor and fix data size.
+       (Output_data_zero_fill::Output_data_zero_fill): Adjust call to base
+       class constructor and fix data size.
+       (Output_data_group::set_final_data_size): New method definition.
+       (Output_data_dynamic::Dynamic_entry::tag): New method definition.
+       (Output_symtab_xindex::Output_symtab_xindex): Adjust call to base
+       class constructor and fix data size.
+       (Output_relaxed_input_section): New class definition.
+       (Output_section::Simple_input_section): New class definition.
+       (Output_section::get_input_sections): Adjust parameter list.
+       (Output_section::add_input_section_for_script): Same.
+       (Output_section::save_states, Output_section::restore_states,
+       Output_section::do_address_and_file_offset_have_reset_values,
+       (Output_section::Input_section::Input_section): Handle
+       RELAXED_INPUT_SECTION_CODE.  Add new overload for
+       Output_relaxed_input_section.
+       (Output_section::Input_section::is_input_section,
+       Output_section::Input_section::set_output_section): Handle relaxed
+       input section.
+       (Output_section::Input_section::is_relaxed_input_section,
+       Output_section::Input_section::output_section_data,
+       Output_section::Input_section::relaxed_input_section): New method
+       definitions.
+       (Output_section::Input_section::RELAXED_INPUT_SECTION_CODE): New enum
+       value.
+       (Output_section::Input_section::u1_): Update comments.
+       (Output_section::Input_section::u2_): Add new union member poris.
+       (Output_section::Checkpoint_output_section): New classs definition.
+       (Output_section::relax_input_section): New method declaration.
+       (Output_section::checkpoint_): New data member.
+       (Output_segment): Update comments.
+       (Output_segment::Output_segment): Un-privatize copy constructor.
+       (Output_segment::operator=): Un-privatize.
+       * script-sections.cc (Output_section_element::Input_section_list):
+       Change element type to Output_section::Simple_input_section.
+       (Output_section_element_dot_assignment::set_section_addresses):
+       Register output section data for relaxation clean up.
+       (Output_data_exression::Output_data_expression): Adjust call to base
+       constructor to fix data size.
+       (Output_section_element_data::set_section_addresses): Register
+       Output_data_expression object for relaxation clean up.
+       (struct Input_section_info): Replace Relobj pointer and section index
+       pair with Output_section::Simple_input_section and Convert struct to a
+       class.
+       (Input_section_sorter::operator()): Adjust access to
+       Input_section_info data member to use accessors. 
+       (Output_section_element_input::set_section_addresses): Use layout
+       parameter.  Adjust code to use Output_section::Simple_input_section
+       and Input_secction_info classes.  Register filler for relaxation
+       clean up.
+       (Orphan_output_section::set_section_addresses): Replace Relobj pointer
+       and section index pair with Output_section::Simple_input_section
+       class.  Adjust code accordingly.
+       (Phdrs_element::release_segment): New method definition.
+       (Script_sections::attach_sections_using_phdrs_clause): Do not modify
+       segment list.
+       (Script_sections::release_segments): New method definition.
+       * gold/script-sections.h (Script_sections::release_segments): New
+       method declaration.
+       * gold/target.h (Target::may_relax, Target::relax,
+       Target::do_may_relax, Target::do_relax): New method definitions.
+
+2009-09-17  Viktor Kutuzov  <vkutuzov@accesssoftek.com>
+
+       * arm.cc (has_signed_unsigned_overflow): New function.
+       (Arm_relocate_functions::abs8): New function.
+       (Target_arm::Scan::local): Handle R_ARM_ABS8.
+       (Target_arm::Scan::global): Likewise.
+       (Target_arm::relocate::relocate): Likewise.
+       (Target_arm::Relocatable_size_for_reloc::get_size_for_reloc):
+       Likewise.
+
+2009-09-16  Cary Coutant  <ccoutant@google.com>
+
+       * testsuite/Makefile.am (MOSTLYCLEANFILES): Add more generated files.
+       * testsuite/Makefile.in: Regenerate.
+
+2009-09-11  Nick Clifton  <nickc@redhat.com>
+
+       * po/gold.pot: Updated by the Translation project.
+
+2009-09-08  Cary Coutant  <ccoutant@google.com>
+
+       * output.cc (Output_file::open): Add execute permission to empty file.
+       * testsuite/Makefile.am (permission_test): New test.
+       * testsuite/Makefile.in: Regenerate.
+
+2009-09-02  Ian Lance Taylor  <iant@google.com>
+
+       * output.cc (Output_file::resize): Call map_no_anonymous rather
+       than map.
+
+2009-09-01  Mikolaj Zalewski  <mikolajz@google.com>
+
+       * gold.cc: Include "incremental.h".
+       (queue_initial_tasks): Call Incremental_checker methods.
+       * incremental.cc: Include "output.h".
+       (Incremental_checker::can_incrementally_link_output_file): New
+       method.
+       * incremental.h (Incremental_checker): New class.
+
+       * output.cc (Output_file::open_for_modification): New method.
+       (Output_file::map_anonymous): Changed return type to bool.  Record
+       map in base_ field.
+       (Output_file::map_no_anonymous): New method, broken out of map.
+       (Output_file::map): Use map_no_anonymous and map_anonymous.
+       * output.h (class Output_file): Update declarations.
+
+2009-08-24  Cary Coutant  <ccoutant@google.com>
+
+       * options.h (Command_line::Pre_options): New class.
+       (Command_line::pre_options): New member.
+       * options.cc (gold::options::ready_to_register): New variable.
+       (One_option::register_option): Do nothing if not registering options.
+       Assert if same short option registered twice.
+       (General_options::General_options): Turn off option registration when
+       done constructing.
+       (Command_line::Pre_options::Pre_options): New constructor.
+
+2009-08-24  Cary Coutant  <ccoutant@google.com>
+
+       * options.h (General_options::no_keep_memory): Remove incorrect
+       short option.
+
+2009-08-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * Makefile.am (am__skiplex, am__skipyacc): New.
+       * Makefile.in: Regenerate.
+
+2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * Makefile.am (AM_CPPFLAGS): Renamed from ...
+       (INCLUDES): ... this.
+       * testsuite/Makefile.am (AUTOMAKE_OPTIONS): Add -Wno-portability.
+       (AM_CPPFLAGS): Renamed from ...
+       (INCLUDE): ... this.
+       * Makefile.in, testsuite/Makefile.in: Regenerate.
+
+       * Makefile.in: Regenerate.
+       * aclocal.m4: Likewise.
+       * config.in: Likewise.
+       * configure: Likewise.
+       * testsuite/Makefile.in: Likewise.
+
+       * Makefile.am (AUTOMAKE_OPTIONS): Add foreign.
+       * testsuite/Makefile.am (AUTOMAKE_OPTIONS): Add foreign.
+       * Makefile.in: Regenerate.
+       * testsuite/Makefile.in: Regenerate.
+
+2009-08-19  Cary Coutant  <ccoutant@google.com>
+
+       * resolve.cc (Symbol_table::resolve): Don't complain about defined
+       symbols in shared libraries overridden by hidden or internal symbols
+       in the main program.
+
+2009-08-19  Chris Demetriou  <cgd@google.com>
+
+       * testsuite/debug_msg.sh: Match .* rather than ${srcdir} when
+       checking source file names in error messages.
+
+2009-08-18  Doug Kwan  <dougkwan@google.com>
+
+       * dynobj.cc (Sized_dynobj::setup): Take a Target object instead of
+       an elcpp::Ehdr as parameter.  Adjust call to set_target.
+       * dynobj.h (Sized_dynobj::setup): Take a Target object instead of
+       an elfcpp::Ehdr as parameter.
+       * object.cc (Object::set_target): Remove the version that looks up
+       a target and sets it.
+       (Sized_relobj::setup): Take a Target object instead of
+       an elfcpp::Ehdr as parameter.  Adjust call to set_target.
+       (make_elf_sized_object): Find target and ask target to
+       make an ELF object.
+       * object.h: (Object::set_target): Remove the version that looks up
+       a target and sets it.
+       (Sized_relobj::setup): Take a Target object instead of
+       an elfcpp:Ehdr as parameter.
+       * target.cc: Include dynobj.h.
+       (Target::do_make_elf_object_implementation): New.
+       (Target::do_make_elf_object): New.
+       * target.h (Target::make_elf_object): New template declaration.
+       (Target::do_make_elf_object): New method declarations.
+       (Target::do_make_elf_object_implementation): New template declaration.
+
+2009-08-14  Ian Lance Taylor  <iant@google.com>
+
+       * gold.h (FUNCTION_NAME): Define.
+       (gold_unreachable): Use FUNCTION_NAME.
+
+2009-08-12  Sriraman Tallam  <tmsriram@google.com>
+
+       * icf.cc (Icf::find_identical_sections): Issue a warning when a
+       symbol in the --keep-unique list is not found.
+
+2009-08-12  Sriraman Tallam  <tmsriram@google.com>
+
+       * icf.cc (Icf::find_identical_sections): Unfold symbols that have
+       been maked as --keep-unique.
+       (Icf::unfold_section): New function.
+       * icf.h (Icf::unfold_section): New function.
+       * options.h (General_options::keep_unique): New option.
+       * testsuite/Makefile.am: Add commands to build icf_keep_unique_test.
+       * testsuite/Makefile.in: Regenerate.
+       * testsuite/icf_keep_unique_test.sh: New file.
+       * testsuite/icf_keep_unique_test.cc: New file.
+
+2009-08-12  Cary Coutant  <ccoutant@google.com>
+
+       PR 10471
+       * resolve.cc (Symbol_table::resolve): Check for references from
+       dynamic objects to hidden and internal symbols.
+       * testsuite/Makefile.am (hidden_test.sh): New test.
+       * testsuite/Makefile.in: Regenerate.
+       * testsuite/hidden_test.sh: New script.
+       * testsuite/hidden_test_1.c: New test source.
+       * testsuite/hidden_test_main.c: New test source.
+
+2009-08-11  Doug Kwan  <dougkwan@google.com>
+
+       * arm.cc: Update comments.
+       (Target_arm::do_finalize_sections): Add a special PT_ARM_EXIDX
+       segment to locate the .ARM.exidx section if present.
+
+2009-08-09  Doug Kwan  <dougkwan@google.com>
+
+       * dynobj.h (Sized_dynobj::do_section_entsize): Revert the previous
+       patch.
+
+2009-08-07  Sriraman Tallam  <tmsriram@google.com>
+       * dynobj.h (Sized_dynobj::do_section_entsize): Add return to avoid
+       compiler warnings.
+
+2009-08-06  Sriraman Tallam  <tmsriram@google.com>
+
+       * x86_64.cc (Target_x86_64::Relocate::relocate_tls): Check for a
+       valid tls_segment only for non-debug-section relocations.
+       * testsuite/Makefile.am: Add gc_tls_test.
+       * testsuite/Makefile.in: Regenerate.
+       * testsuite/gc_tls_test.cc: New file.
+       * testsuite/gc_tls_test.sh: New file.
+
+2009-08-05  Sriraman Tallam  <tmsriram@google.com>
+       
+       * icf.cc: New file.
+       * icf.h: New file.
+       * Makefile.am (CCFILES): Add icf.cc.
+       (HFILES): Add icf.h
+       * Makefile.in: Regenerate.
+       * dynobj.h (Sized_dynobj::do_section_entsize): New function.
+       * gc.h (gc_process_relocs): Populate lists used by icf to contain
+       section, symbol and addend information for the relocs.
+       * gold.cc (queue_middle_tasks): Call identical code folding.
+       * gold.h: Add defines for multimap.
+       * layout.cc (Layout::create_symtab_sections): Add symtab as parameter
+       to the call of finalize_local_symbols.
+       * main.cc (main): Create object of class Icf.
+       * object.cc (Sized_relobj::do_layout): Allow this function to be
+       called twice during icf.
+       (Sized_relobj::do_finalize_local_symbols): Fold symbols corresponding
+       to sections marked as identical by icf.
+       (Sized_relobj::do_section_flags): Get section_flags from Symbols_data
+       when available.
+       (Sized_relobj::do_section_entsize): New function.
+       * object.h (Object::section_entsize): New function.
+       (Object::do_section_entsize): New pure virtual function.
+       (Relobj::finalize_local_symbols): Add new parameter.
+       (Relobj::do_section_entsize): New function.
+       * options.h (General_options::icf): New option.
+       (General_options::icf_iterations): New option.
+       (General_options::print_icf_sections): New option.
+       * plugin.cc (Sized_pluginobj::do_section_entsize): New function.
+       * plugin.h (Sized_pluginobj::do_section_entsize): New function.
+       * reloc.cc (Read_relocs::run): Delay scanning relocs when doing
+       icf.
+       * symtab.cc (Symbol_table::is_section_folded): New function.
+       (Symbol_table::sized_finalize_symbol):  Fold symbols corresponding
+       to sections marked as identical by icf.
+       * symtab.h (Symbol_table::set_icf): New function.
+       (Symbol_table::icf): New function.
+       (Symbol_table::is_section_folded): New function.
+       (Symbol_table::icf_): New data member.
+       * target-reloc.h (relocate_section): Ignore sections folded by icf.
+       * testsuite/Makefile.am: Add commands to build icf_test.
+       * testsuite/Makefile.in: Regenerate.
+       * testsuite/icf_test.sh: New file.
+       * testsuite/icf_test.cc: New file.
+
+2009-07-24  Chris Demetriou  <cgd@google.com>
+
+       * layout.cc (is_compressible_debug_section): Fix incorrect
+       comment about compressed section names.
+
+2009-07-20  Ian Lance Taylor  <ian@airs.com>
+
+       PR 10419
+       * x86_64.cc (Target_x86_64::do_code_fill): Correct nop sequences.
+
+2009-07-16  Ian Lance Taylor  <iant@google.com>
+
+       PR 10400
+       * layout.h: #include <map>.
+       (class Kept_section): Change from struct to class.  Add accessors
+       and setters.  Add section size to Comdat_group mapping.  Change
+       Comdat_group to std::map.  Add is_comdat_ field.  Add
+       linkonce_size field in union.
+       (class Layout): Update declaration of find_or_add_kept_section.
+       Don't declare find_kept_object.
+       * layout.cc (Layout::find_or_add_kept_section): Remove candidate
+       parameter.  Add object, shndx, is_comdat, and is_group_name
+       parameters.  Change all callers.  Adjust for new Kept_section.
+       (Layout::find_kept_object): Remove.
+       * object.cc (Sized_relobj::include_section_group): Update use of
+       Kept_section.  Rename secnum to shndx.  Only record
+       Kept_comdat_section if sections are the same size.
+       (Sized_relobj::include_linkonce_section): Update use of
+       Kept_section.  Only record Kept_comdat_section if sections are the
+       same size.  Set size of linkonce section.
+       (Sized_relobj::map_to_kept_section): Update call to
+       get_kept_comdat_section.
+       * object.h (class Sized_relobj): Rename fields in
+       Kept_comdat_section to drop trailing underscores; change object
+       field to Relobj*.  Change Kept_comdat_section_table to store
+       struct rather than pointer.
+       (Sized_relobj::set_kept_comdat_section): Remove kept parameter.
+       Add kept_object and kept_shndx parameters.  Change all callers.
+       (Sized_relobj::get_kept_comdat_section): Change return type to
+       bool.  Add kept_object and kept_shndx parameters.  Change all
+       callers.
+       * plugin.cc (Pluginobj::include_comdat_group): Update call to
+       Layout::find_or_add_kept_section.
+
+2009-07-09  Ian Lance Taylor  <iant@google.com>
+
+       * merge.cc (Object_merge_map::initialize_input_to_output_map):
+       Reserve space in the hash table.
+
+2009-07-06  Mikolaj Zalewski  <mikolajz@google.com>
+
+       * fileread.cc (File_read::get_mtime): New method.
+       * fileread.h (Timespec): New structure.
+       (File_read::get_mtime): New method.
+       * incremental.cc (Incremental_inputs_entry_data::timestamp_usec):
+       Renamed from timestamp_nsec.
+       (Incremental_inputs_entry_write::timestamp_sec): Fix argument to
+       Elf_Xword.
+       (Incremental_inputs_entry_write::timestamp_usec): Renamed from 
+       timestamp_nsec.
+       (Incremental_inputs::report_archive): Save mtime; style fix. 
+       (Incremental_inputs::report_obejct): Save mtime; style fix.
+       (Incremental_inputs::report_script): Save mtime; style fix.
+       (Incremental_inputs::finalize_inputs): Style fix.
+       (Incremental_inputs::finalize): Style fix.
+       (Incremental_inputs::create_input_section_data): Store inputs
+       mtime.
+       * incremental.h (Incremental_inputs::report_script): Add mtime
+       argument.
+       (Incremental_inputs::Input_info::Input_info): Intialize only one
+       union member.
+       (Incremental_inputs::Input_info::archive): Move to nameless
+       union.
+       (Incremental_inputs::Input_info::obejct): Move to nameless union.
+       (Incremental_inputs::Input_info::script): Move to nameless union.
+       (Incremental_inputs::mtime): New field.
+       * script.cc (read_input_script): Pass file mtime to
+       Incremental_input.
+       * script.h (Script_info::inputs): Style fix.
+
+2009-07-01  Ian Lance Taylor  <ian@airs.com>
+
+       * freebsd.h (Target_freebsd::do_adjust_elf_header): Use size
+       instead of 32.
+
+2009-06-24  Ian Lance Taylor  <iant@google.com>
+
+       PR 10156
+       * 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.
+
+2009-06-24  Ian Lance Taylor  <iant@google.com>
+
+       * script-sections.cc (Output_section_definition::
+       set_section_addresses): Rename shadowing local load_address to
+       laddr.
+
+2009-06-24  Ian Lance Taylor  <iant@google.com>
+
+       PR 10244
+       * reloc.cc (relocate_sections): Skip empty relocation sections.
+
+2009-06-23  Ian Lance Taylor  <iant@google.com>
+
+       PR 10156
+       * layout.cc (Layout::create_note): Use choose_output_section
+       rather than make_output_section.
+
+2009-06-23  Ian Lance Taylor  <iant@google.com>
+
+       PR 10237
+       * options.cc (General_options::parse_V): Set printed_version_.
+       (General_options::General_options): Initialize printed_version_.
+       * options.h (class General_options): Add printed_version_ field.
+       * gold.cc (queue_initial_tasks): If there are no input files,
+       don't give a fatal error if we printed the version information.
+       (queue_middle_tasks): If using -r with a shared object, give a
+       fatal error rather than an ordinary error.
+
+2009-06-23  Ian Lance Taylor  <iant@google.com>
+
+       PR 10219
+       * layout.cc (Layout::Layout): Initialize have_stabstr_section_.
+       (Layout::make_output_section): Set have_stabstr_section_ if we see
+       a .stab*str section.
+       (Layout::finalize): Call link_stabs_sections.
+       (Layout::link_stabs_sections): New file.
+       * layout.h (class Layout): Add have_stabstr_section_ field.
+       Declare link_stabs_sections.
+
+2009-06-23  Doug Kwan  <dougkwan@google.com>
+
+       * Makefile.am (libgold_a_LIBADD): New.
+       (ld_new_DEPENDENCIES, ld_new_LDADD): Remove LIBOBJS
+       * Makefile.in: Regenerate.
+       * config.in (HAVE_DECL_MEMMEM, HAVE_DECL_STRNDUP): New.
+       * configure: Regenerate.
+       * configure.ac (AC_CHECK_DECLS): Add strndup and memmem.
+       * fileread.cc: Include sys/state.h
+       * gold.h: Declare memmem and strndup if found missing.
+       * gold_reloc.h: Include byteswap.h if HAVE_BYTESWAP_H is defined.
+
+2009-06-23  Ian Lance Taylor  <iant@google.com>
+
+       * configure.ac: Call AC_CHECK_DECLS using C, not C++.
+       * configure: Rebuild.
+
+2009-06-23  Ian Lance Taylor  <iant@google.com>
+
+       PR 10147
+       * object.cc (Object::section_contents): Don't try to get a view if
+       the section has length zero.
+       (Object::handle_gnu_warning_section): If the section is empty, use
+       the name of the section as the warning.
+
+2009-06-23  Ian Lance Taylor  <iant@google.com>
+
+       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.
+
+2009-06-22  Ian Lance Taylor  <iant@google.com>
+
+       PR 10030
+       * yyscript.y: Parse TARGET.
+       * script.cc (script_set_target): New function.
+       * script-c.h (script_set_target): Declare.
+       * options.cc (General_options::string_to_object_format): Rename
+       from string_to_object_format in anonymous namespace.  Change
+       callers.
+       * options.h (class General_options): Declare
+       string_to_object_format.
+
+2009-06-22  Ian Lance Taylor  <iant@google.com>
+
+       * script-sections.cc (Script_sections::create_segments): Don't put
+       program headers in a PT_LOAD segment if -n or -N.
+
+2009-06-22  Ian Lance Taylor  <iant@google.com>
+
+       PR 10141
+       * options.h (class General_options): Add -z lazy and -z now.  Sort
+       -z options into alphabetical order.
+       * layout.cc (Layout::finish_dynamic_section): Handle -z now.
+
+2009-06-21  Ian Lance Taylor  <iant@google.com>
+
+       * layout.cc (Layout::make_output_section): Call
+       Target::new_output_section.
+       (Layout::attach_allocated_section_to_segment): Put large section
+       sections in a separate load segment with the large segment flag
+       set.
+       (Layout::segment_precedes): Sort large data segments after other
+       load segments.
+       (align_file_offset): New static function.
+       (Layout::set_segment_offsets): Use align_file_offset.
+       * output.h (class Output_section): Add is_small_section_ and
+       is_large_section_ fields.
+       (Output_section::is_small_section): New function.
+       (Output_section::set_is_small_section):  New function.
+       (Output_section::is_large_section): New function.
+       (Output_section::set_is_large_section): New function.
+       (Output_section::is_large_data_section): New function.
+       (class Output_segment): Add is_large_data_segment_ field.
+       (Output_segment::is_large_data_segment): New function.
+       (Output_segment::set_is_large_data_segment): New function.
+       * output.cc (Output_section::Output_section): Initialize new
+       fields.
+       (Output_segment::Output_segment): Likewise.
+       (Output_segment::add_output_section): Add assertion that large
+       data sections always go in large data segments.  Force small data
+       sections to the end of the list of data sections.  Force small BSS
+       sections to the start of the list of BSS sections.  For large BSS
+       sections to the end of the list of BSS sections.
+       * symtab.h (class Symbol): Declare is_common_shndx.
+       (Symbol::is_defined): Check Symbol::is_common_shndx.
+       (Symbol::is_common): Likewise.
+       (class Symbol_table): Define enum Commons_section_type.  Update
+       declarations.  Add small_commons_ and large_commons_ fields.
+       * symtab.cc (Symbol::is_common_shndx): New function.
+       (Symbol_table::Symbol_table): Initialize new fields.
+       (Symbol_table::add_from_object): Put small and large common
+       symbols in the right list.
+       (Symbol_table::sized_finalized_symbol): Check
+       Symbol::is_common_shndx.
+       (Symbol_table::sized_write_globals): Likewise.
+       * common.cc (Symbol_table::do_allocate_commons): Allocate new
+       common symbol lists.  Don't call do_allocate_commons_list if the
+       list is empty.
+       (Symbol_table::do_allocate_commons_list): Remove is_tls
+       parameter.  Add comons_section_type parameter.  Change all
+       callers.  Handle small and large common symbols.
+       * object.cc (Sized_relobj::do_finalize_local_symbols): Check
+       Symbol::is_common_shndx.
+       * resolve.cc (symbol_to_bits): Likewise.
+       * target.h (Target::small_common_shndx): New function.
+       (Target::small_common_section_flags): New function.
+       (Target::large_common_shndx): New function.
+       (Target::large_common_section_flags): New function.
+       (Target::new_output_section): New function.
+       (Target::Target_info): Add small_common_shndx, large_common_shndx,
+       small_common_section_flags, and large_common_section_flags
+       fields.
+       (Target::do_new_output_section): New virtual function.
+       * arm.cc (Target_arm::arm_info): Initialize new fields.
+       * i386.cc (Target_i386::i386_info): Likewise.
+       * powerpc.cc (Target_powerpc::powerpc_info) [all versions]:
+       Likewise.
+       * sparc.c (Target_sparc::sparc_info) [all versions]: Likewise.
+       * x86_64.cc (Target_x86_64::x86_64_info): Likewise.
+       (Target_x86_64::do_new_output_section): New function.
+       * configure.ac: Define conditional MCMODEL_MEDIUM.
+       * testsuite/Makefile.am (check_PROGRAMS): Add large.
+       (large_SOURCES, large_CFLAGS, large_DEPENDENCIES): Define.
+       (large_LDFLAGS): Define.
+       * testsuite/large.c: New file.
+       * testsuite/testfile.cc (Target_test::test_target_info):
+       Initialize new fields.
+       * configure, testsuite/Makefile.in: Rebuild.
+
+2009-06-05  Doug Kwan  <dougkwan@google.com>
+
+       * Makefile.am (CCFILES): Add target.cc.
+       * Makefile.in: Regenerate. 
+       * i386.cc (class Target_i386): Define new virtual method to
+       override do_is_local_label_name in parent.
+       * object.cc (Sized_relobj::do_count_local_symbols): Discard
+       local symbols if --discard-locals or -X is given.
+       * options.h (class General_options): Declare new options
+       '--discard-locals' and '-X' for discarding locals.
+       * target.h (class Target): Define new methods is_local_label_name.
+       Declare new virtual method do_is_local_label_name.
+       * target.cc: New file.
+       * testsuite/Makefile.am (check_PROGRAMS): Add discard_locals_test.
+       (check_SCRIPTS): Add discard_locals_test.sh.
+       (check_DATA): Add discard_local_tests.syms.
+       (discard_locals_test_SOURCES, discard_locals_test_LDFLAGS): Define.
+       (discard_local_tests.syms, discard_locals_test.o): New make rules.
+       * testsuite/Makefile.in: Regenerate.
+       * testsuite/discard_locals_test.c: New file.
+       * testsuite/discard_locals_test.sh: Same.
+
+2009-06-05  Doug Kwan  <dougkwan@google.com>
+
+       * object.cc (Sized_relobj::Sized_relobj): Initialize
+       discarded_eh_frame_shndx_ to -1U.
+       (Sized_relobj::do_layout): Record index of a discard .eh_frame
+       section.
+       (Sized_relobj::do_count_local_symbols): Skip local symbols in
+       a discarded .eh_frame section.
+       (Sized_relobj::do_finalize_local_symbols): Ditto.
+       * object.h (class Sized_relobj): Declare new member
+       discarded_eh_frame_shndx_.
+       * testsuite/Makefile.am (check_PROGRAMS): Add local_labels_test.
+       (local_labels_test.o, local_labels_test): New rules.
+       * testsuite/Makefile.in: Regenerate.
+
+2009-06-04  Doug Kwan  <dougkwan@google.com>
+
+       * layout.cc (Layout::section_name_mapping): Add mapping for
+       special ARM sections.
+
+2009-06-03  Doug Kwan  <dougkwan@google.com>
+
+       * arm.cc (utils::sign_extend): Reverse test in gold_assert.
+       (utils::has_overflow): Same.
+
+2009-06-03  Ian Lance Taylor  <iant@google.com>
+
+       * layout.cc (Layout::section_name_mapping): New array, replacing
+       Layout::linkonce_mapping.
+       (Layout::section_name_mapping_count): New variable, replacing
+       Layout::linkonce_mapping_count.
+       (Layout::linkonce_output_name): Remove.
+       (Layout::output_section_name): Rewrite.
+       * layout.h (class Layout): Rename Linkonce_mapping to
+       Section_name_mapping, linkonce_mapping to section_name_mapping,
+       linkonce_mapping_count to section_name_mapping_count.  Don't
+       declare linkonce_output_name.
+
+2009-06-03  Doug Kwan  <dougkwan@google.com>
+
+       * gold/arm.cc (namespace utils): New.
+       (Target_arm::reloc_is_non_pic): Define new method.
+       (class Arm_relocate_functions): New.
+       (Target_arm::Relocate::relocate): Handle relocation types used by
+       Android.
+
+2009-06-03  Ian Lance Taylor  <iant@google.com>
+
+       * arm.cc (Target_arm::scan::global): Use || instead of |.
+
+2009-06-02  Doug Kwan  <dougkwan@google.com>
+
+       * gold/arm.cc (Target_arm::Scan::Scan):  Initialize
+       issued_non_pic_error_.
+       (class Target_arm::Scan): Declare new method check_non_pic.
+       Define new method symbol_needs_plt_entry.
+       Declare new data member issued_non_pic_error_.
+       (class Target_arm::Relocate): Declare new method
+       should_apply_static_reloc.
+       (Target_arm::may_need_copy_reloc): Handle STT_ARM_TFUNC.
+       (Target_arm::Scan::check_non_pic): Define new method.
+       (Target_arm::Scan::local): Handle a small subset of reloc types used
+       by Android.
+       (Target_arm::Scan::local): Same.
+       (Target_arm::Relocate::should_apply_statci_reloc): Define new method.
+
+2009-05-31  Mikolaj Zalewski  <mikolajz@google.com>
+
+       * incremental.cc (Incremental_inputs::report_command_line): Filter
+       out --incremental-* options.
+
+2009-05-29  Doug Kwan  <dougkwan@google.com>
+
+       * gold/arm.cc (Output_data_plt_arm): Forward declaration for new
+       template class.
+       (class Target_arm): Update comment.
+       (Target_arm::Target_arm): Initialize new data members GOT_,
+       PLT_, GOT_PLT_, REL_DYN_, COPY_RELOCS_ and DYNBSS_.
+       Declare new methods Target_arm::got_section, Target_arm::make_plt_entry
+       and Target_arm::rel_dyn_section.
+       Declare new_enum Target_arm::Got_type.
+       Declare new data members GOT_, PLT_, GOT_PLT_, REL_DYN_, COPY_RELOCS_
+       and DYNBSS_.
+       Update commments for member do_dynsym_value.
+       (Target_arm::got_size, Target_arm::plt_section,
+       Target_arm::may_need_copy_reloc and Target_arm::copy_reloc): Define
+       new methods inside class defintion.
+       (Target_arm::got_section): Define new method.
+       (Target_arm::rel_dyn_section): Same.
+       (Output_data_plt_arm): New template class.
+       (Output_data_plt_arm::Output_data_plt_arm): Define constructor.
+       (Output_data_plt_arm:do_adjust_output_section): Define new method.
+       (Output_data_plt_arm::add_entry): Same.
+       (Output_data_plt_arm::first_plt_entry): Define new
+       static data member for PLT instruction template.
+       (Output_data_plt_arm::plt_entry): Same.
+       (Output_data_plt_arm::do_write): Define new method.
+       (Target_arm::make_plt_entry): Same.
+       (Target_arm::do_finalize_sections): Same.
+       (Target_arm::do_dynsym_value): Same.
+
+2009-05-28  Doug Kwan  <dougkwan@google.com>
+
+       * Makefile.am (TARGETSOURCES): Add arm.cc.
+       (ALL_TARGETOBJECTS): Add arm.$(OBJEXT)
+       * Makefile.in: Regenerate.
+       * arm.cc: New file.
+       * configure.tgt: Add armbe*-*-*, armeb*-*-* and arm*-*-* targets.
+
 2009-05-26  Doug Kwan  <dougkwan@google.com>
 
        * options.cc (General_options::parse_exclude_libs).  Fix a comment.
This page took 0.036727 seconds and 4 git commands to generate.