PR gold/12629
[external/binutils.git] / gold / ChangeLog
index 1ec3942..62ee3ca 100644 (file)
@@ -1,3 +1,145 @@
+2011-06-29  Ian Lance Taylor  <iant@google.com>
+
+       PR gold/12629
+       * object.cc (Sized_relobj_file::layout_section): Change shdr
+       parameter to be const.
+       (Sized_relobj_file::layout_eh_frame_section): New function, broken
+       out of do_layout.
+       (Sized_relobj_file::do_layout): Defer .eh_frame sections if
+       appropriate.  Call layout_eh_frame_section.
+       (Sized_relobj_file::do_layout_deferred_sections): Handle .eh_frame
+       sections.
+       * object.h (class Sized_relobj_file): Update declarations.
+
+2011-06-29  Ian Lance Taylor  <iant@google.com>
+
+       PR gold/12652
+       * script.cc (Token::integer_value): Accept trailing M/m/K/k
+       modifier.
+       (Lex::gather_token): Accept trailing M/m/K/k for integers.
+
+2011-06-29  Ian Lance Taylor  <iant@google.com>
+
+       PR gold/12675
+       * object.cc (Sized_relobj_file::check_eh_frame_flags): Check for
+       SHT_X86_64_UNWIND.
+       * layout.cc (Layout::layout_eh_frame): Likewise.
+
+2011-06-29  Ian Lance Taylor  <iant@google.com>
+
+       PR gold/12695
+       * layout.cc (Layout::symtab_section_shndx): New function.
+       * layout.h (class Layout): Declare symtab_section_shndx.
+       * output.cc (Output_section::write_header): Call it.
+
+2011-06-29  Ian Lance Taylor  <iant@google.com>
+
+       PR gold/12818
+       * symtab.cc (Symbol::should_add_dynsym_entry): Don't add undefined
+       symbols which are not used in a relocation.
+
+2011-06-28  Ian Lance Taylor  <iant@google.com>
+
+       PR gold/12898
+       * layout.cc (Layout::segment_precedes): Don't crash if a linker
+       script create indistinguishable segments.
+       (Layout::set_segment_offsets): Use stable_sort when sorting
+       segments.  Pass this to Compare_segments constructor.
+       * layout.h (class Layout): Make segment_precedes non-static.
+       (class Compare_segments): Change from struct to class.  Add
+       layout_ field.  Add constructor.
+       * script-sections.cc
+       (Script_sections::attach_sections_using_phdrs_clause): Rename
+       local orphan to is_orphan.  Don't report failure to put empty
+       section in segment.  On attachment failure, report name of
+       section, and attach to first PT_LOAD segment.
+
+2011-06-28  Ian Lance Taylor  <iant@google.com>
+
+       PR gold/12934
+       * target-select.cc (Target_selector::Target_selector): Add
+       emulation parameter.  Change all callers.
+       (select_target_by_bfd_name): Rename from select_target_by_name.
+       Change all callers.
+       (select_target_by_emulation): New function.
+       (supported_emulation_names): New function.
+       * target-select.h (class Target_selector): Add emulation_ field.
+       Update declarations.
+       (Target_selector::recognize_by_bfd_name): Rename from
+       recognize_by_name.  Change all callers.
+       (Target_selector::supported_bfd_names): Rename from
+       supported_names.  Change all callers.
+       (Target_selector::recognize_by_emulation): New function.
+       (Target_selector::supported_emulations): New function.
+       (Target_selector::emulation): New function.
+       (Target_selector::do_recognize_by_bfd_name): Rename from
+       do_recognize_by_name.  Change all callers.
+       (Target_selector::do_supported_bfd_names): Rename from
+       do_supported_names.  Change all callers.
+       (Target_selector::do_recognize_by_emulation): New function.
+       (Target_selector::do_supported_emulations): New function.
+       (select_target_by_bfd_name): Change name in declaration.
+       (select_target_by_emulation): Declare.
+       (supported_emulation_names): Declare.
+       * parameters.cc (parameters_force_valid_target): Try to find
+       target based on emulation from -m option.
+       * options.h (class General_options): Change doc string for -m.
+       * options.cc (help): Print emulations.
+       (General_options::parse_V): Likewise.
+       * freebsd.h (Target_selector_freebsd::Target_selector_freebsd):
+       Add emulation parameter.  Change all callers.
+
+2011-06-28  Ian Lance Taylor  <iant@google.com>
+
+       * target.h (class Target): Add osabi_ field.
+       (Target::osabi): New function.
+       (Target::set_osabi): New function.
+       (Target::Target): Initialize osabi_.
+       (Target::do_adjust_elf_header): Make pure virtual.
+       (Sized_target::do_adjust_elf_header): Declare.
+       * target.cc (Sized_target::do_adjust_elf_header): New function.
+       (class Sized_target): Instantiate all versions.
+       * freebsd.h (class Target_freebsd): Remove.
+       (Target_selector_freebsd::do_recognize): Call set_osabi on
+       Target.
+       (Target_selector_freebsd::do_recognize_by_name): Likewise.
+       (Target_selector_freebsd::set_osabi): Remove.
+       * i386.cc (class Target_i386): Inherit from Sized_target rather
+       than Target_freebsd.
+       * x86_64.cc (class Target_x86_64): Likewise.
+
+2011-06-28  Ian Lance Taylor  <iant@google.com>
+
+       * target.h (Target::can_check_for_function_pointers): Rewrite.
+       Make non-virtual.
+       (Target::can_icf_inline_merge_sections): Likewise.
+       (Target::section_may_have_icf_unsafe_poineters): Likewise.
+       (Target::Target_info): Add can_icf_inline_merge_sections field.
+       (Target::do_can_check_for_function_pointers): New virtual
+       function.
+       (Target::do_section_may_have_icf_unsafe_pointers): Likewise.
+       * arm.cc (Target_arm::do_can_check_for_function_pointers): Rename
+       from can_check_for_function_pointers, move in file.
+       (Target_arm::do_section_may_have_icf_unsafe_pointers): Rename from
+       section_may_have_icf_unsafe_poineters, move in file.
+       (Target_arm::arm_info): Initialize can_icf_inline_merge_sections.
+       * i386.cc (Target_i386::do_can_check_for_function_pointers):
+       Rename from can_check_for_function_pointers, move in file.
+       (Target_i386::can_icf_inline_merge_sections): Remove.
+       (Target_i386::i386_info): Initialize
+       can_icf_inline_merge_sections.
+       * powerpc.cc (Target_powerpc::powerpc_info) [all versions]:
+       Initialize can_icf_inline_merge_sections.
+       * sparc.cc (Target_sparc::sparc_info) [both version]: Likewise.
+       * x86_64.cc (Target_x86_64::do_can_check_for_function_pointers):
+       Rename from can_check_for_function_pointers, move in file.
+       (Target_x86_64::can_icf_inline_merge_sections): Remove.
+       (Target_x86_64::x86_64_info): Initialize
+       can_icf_inline_merge_sections.
+       * testsuite/testfile.cc (Target_test::test_target_info):
+       Likewise.
+       * icf.cc (get_section_contents): Correct formatting.
+
 2011-06-27  Ian Lance Taylor  <iant@google.com>
 
        * symtab.cc (Symbol::versioned_name): New function.