+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.
(Target_arm::Relocatable_size_for_reloc::get_size_for_reloc):
Likewise.
-2009-09-08 Cary Coutant <ccoutant@google.com>
+2009-09-16 Cary Coutant <ccoutant@google.com>
* testsuite/Makefile.am (MOSTLYCLEANFILES): Add more generated files.
* testsuite/Makefile.in: Regenerate.