* pread.c: Include stdio.h.
[binutils-gdb.git] / gold / ChangeLog
index 296765a6cb99597f0c3f83178094ee2c62dac085..eb37d39dc632c00904d625328f2d0daa8b5c7806 100644 (file)
@@ -1,3 +1,254 @@
+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,