[GOLD] Relocate::relocate() params
[binutils-gdb.git] / gold / ChangeLog
index ebed52b2ee0bbaa9c7bda54439735b0a3a20835c..be004cd1e550753cb18703414eec850afdd951ef 100644 (file)
@@ -1,3 +1,346 @@
+2015-12-09  Alan Modra  <amodra@gmail.com>
+
+       * object.h (struct Relocate_info): Add "rr".
+       * reloc.h (Relocatable_relocs::set_strategy): New accessor.
+       * reloc.cc (Sized_relobj_file::do_relocate_sections): Init
+       relinfo.rr for relocate_section and relocate_relocs.
+       * powerpc.cc (relocate): Add rel_type and preloc parameters.
+       Delete rela and r_type params, instead recalculate these from
+       preloc.
+       (relocate_relocs): Delete Relocatable_relocs* param, instead
+       use relinfo->rr.
+       * aarch64.cc: Likewise.
+       * arm.cc: Likewise.
+       * i386.cc: Likewise.
+       * mips.cc: Likewise.
+       * s390.cc: Likewise.
+       * sparc.cc: Likewise.
+       * target.h: Likewise.
+       * tilegx.cc: Likewise.
+       * x86_64.cc: Likewise.
+       * testsuite/testfile.cc: Likewise.
+       * target-reloc.h (relocate_section): Adjust to suit.
+       (apply_relocation, relocate_relocs): Likewise.
+
+2015-12-07  Alan Modra  <amodra@gmail.com>
+
+       * powerpc.cc (add_2_2_12, ld_2_12, lis_2): Define.
+       (Target_powerpc::Scan::local, global): Handle R_PPC64_ENTRY.
+       (Target_powerpc::Relocate::relocate): Edit code at R_PPC64_ENTRY.
+
+2015-12-03  Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
+
+       * object.cc (Sized_relobj::do_for_all_local_got_entries): Use
+       Local_got_entry_key for searching in local_got_offsets_.
+       * object.h (class Local_got_entry_key): New class.
+       (Relobj::local_has_got_offset): New overloaded method.
+       (Relobj::local_got_offset): Likewise.
+       (Relobj::set_local_got_offset): Likewise.
+       (Relobj::do_local_has_got_offset): Add addend argument.
+       (Relobj::do_local_got_offset): Likewise.
+       (Relobj::do_set_local_got_offset): Likewise.
+       (Sized_relobj::do_local_has_got_offset): Add addend argument, and use
+       Local_got_entry_key for searching through local_got_offsets_.
+       (Sized_relobj::do_local_got_offset): Likewise.
+       (Sized_relobj::do_set_local_got_offset): Likewise.
+       (Sized_relobj::Local_got_offsets): Change type of the key from
+       unsigned int to Local_got_entry_key, and add hash and equal_to.
+       * output.cc (Got_entry::write): Take addend into account for
+       calculating value of the local symbol for GOT.
+       (Output_data_got::add_local): New definition of overloaded method.
+       (Output_data_got::add_local_with_rel): Likewise.
+       (Output_data_got::add_local_pair_with_rel): Likewise.
+       * output.h (Output_data_got::add_local): New declaration of overloaded
+       method.
+
+2015-11-25  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/19291
+       * object.cc (Sized_relobj_file::write_local_symbols): If relocatable,
+       subtract section address from symbol value.
+
+2015-11-25  Alan Modra  <amodra@gmail.com>
+
+       * powerpc.cc (Output_data_got_powerpc::Output_data_got_powerpc): Align
+       to 256 byte boundary.
+
+2015-11-19  Alan Modra  <amodra@gmail.com>
+
+       * powerpc.cc (Target_powerpc::Scan::get_reference_flags): Correct
+       GOT16 and TOC16 relocs to RELATIVE_REF.
+
+2015-11-14  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/19244
+       PR gold/18548
+       * symtab.cc (Symbol_table::do_define_in_output_data): Check for forced
+       local symbols only for predefined symbols.
+
+2015-11-11  Alan Modra  <amodra@gmail.com>
+           Peter Bergner <bergner@vnet.ibm.com>
+
+       * gold/powerpc.cc (Powerpc_relocate_functions::addr16_dq): New function.
+       (Powerpc_relocate_functions::addr16dx_ha): Likewise.
+       (Target_powerpc::Scan::local): Handle R_POWERPC_REL16DX_HA.
+       (Target_powerpc::Scan::global): Likewise.
+       (Target_powerpc::Relocate::relocate): Likewise.
+
+2015-11-09  Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
+
+       * layout.h (Layout::is_debug_info_section): Recognize .pdr debug
+       sections.
+
+2015-11-09  Cary Coutant  <ccoutant@gmail.com>
+           Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
+
+       * copy-relocs.h (Copy_relocs::copy_reloc): Replace reloc parameter
+       with type, offset, addend.
+       (Copy_relocs::save): Likewise.
+       * copy-relocs.cc (Copy_relocs::copy_reloc): Likewise.
+       (Copy_relocs::save): Likewise.
+       * aarch64.cc (Target_aarch64::copy_reloc): Pass r_type, r_offset,
+       and r_addend to Copy_relocs::copy_reloc.
+       * arm.cc (Target_arm::copy_reloc): Likewise.
+       * i386.cc (Target_i386::copy_reloc): Likewise.
+       * mips.cc (Target_mips::copy_reloc): Likewise.
+       * powerpc.cc (Target_powerpc::copy_reloc): Likewise.
+       * s390.cc (Target_s390::copy_reloc): Likewise.
+       * sparc.cc (Target_sparc::copy_reloc): Likewise.
+       * tilegx.cc (Target_tilegx::copy_reloc): Likewise.
+       * x86_64.cc (Target_x86_64::copy_reloc): Likewise.
+
+2015-11-05  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/19119
+       PR gold/19172
+       PR gold/19197
+       Revert commit 6457197210144f50a696097c0d308d81d46d5510:
+       2015-10-16  H.J. Lu  <hongjiu.lu@intel.com>
+               * options.h (General_options): Remove "obsolete" from -m.
+               * parameters.cc (set_parameters_target): Check if input target
+               is compatible with output emulation set by "-m emulation".
+
+2015-11-05  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/19163
+       * aarch64.cc (Target_aarch64::Relocate::relocate): Don't apply
+       certain relocations if --no-apply-dynamic-relocs is set.
+       * options.h (--apply-dynamic-relocs): New aarch64-specific option.
+
+2015-11-03  Alan Modra  <amodra@gmail.com>
+
+       * po/POTFILES.in: Regenerate.
+
+2015-10-30  Nick Clifton  <nickc@redhat.com>
+
+       * po/zh_CN.po: New (simplified) Chinese translation.
+
+2015-10-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gold/19184
+       * incremental.cc (Got_plt_view_info): Add got_entry_size.
+       (Local_got_offset_visitor::visit): Replace got_entry_size_
+       with info_.got_entry_size.
+       (Local_got_offset_visitor::got_entry_size_): Removed.
+       (Global_got_offset_visitor::visit): Replace got_entry_size_
+       with info_.got_entry_size.
+       (Global_got_offset_visitor::got_entry_size_): Removed.
+       (Output_section_incremental_inputs::write_got_plt): Initialize
+       view_info.got_entry_size.
+       * target.h (Sized_target::got_entry_size): New virtual function.
+       * x86_64.cc (Target_x86_64::got_entry_size): New function.
+
+2015-10-28  Marcin Kościelnicki  <koriakin@0x04.net>
+
+       * testsuite/binary_test.cc: Add __attribute__((aligned(1))).
+       * testsuite/script_test_12a.c: Likewise.
+       * testsuite/script_test_1a.cc: Likewise.
+       * testsuite/script_test_2.cc: Likewise.
+
+2015-10-28  Marcin Kościelnicki  <koriakin@0x04.net>
+
+       * testsuite/debug_msg.sh: Accept more fuzz in line numbers.
+
+2015-10-28  Marcin Kościelnicki  <koriakin@0x04.net>
+
+       PR gold/18959
+       * stringpool.cc (Stringpool_template::new_key_offset): Align all
+       strings, even zero-length.
+       (Stringpool_template::set_string_offsets): Likewise.
+
+2015-10-28  Marcin Kościelnicki  <koriakin@0x04.net>
+
+       * s390.cc: New file.
+       * Makefile.am (TARGETSOURCES): Add s390.cc.
+       (ALL_TARGETOBJS): Add s390.o.
+       * Makefile.in: Regenerate.
+       * configure.ac: Add s390 support.
+       * configure: Regenerate.
+       * configure.tgt: Add s390-*-* and s390x-*-*.
+       * testsuite/icf_safe_test.sh (arch_specific_safe_fold): Add s390
+       support.
+
+2015-10-28  Marcin Kościelnicki  <koriakin@0x04.net>
+
+       * archive.cc (Archive::sym64name): New const.
+       (Archive::setup): Add support for SYM64 armap.
+       (Archive::read_armap): Likewise.
+       (Archive::interpret_header): Likewise.
+       (Archive::const_iterator::read_next_header): Likewise.
+       * archive.h (Archive::sym64name): New const.
+       (Archive::read_armap): Add mapsize template parameter.
+
+2015-10-28  Marcin Kościelnicki  <koriakin@0x04.net>
+
+       * dynobj.cc (Dynobj::create_elf_hash_table): Create hash table with
+       target-specific entry size.
+       (Dynobj::sized_create_elf_hash_table): Add size template parameter.
+       * dynobj.h (Dynobj::sized_create_elf_hash_table): Likewise.
+       * layout.cc (Layout::create_dynamic_symtab): Set entsize to
+       hash_entry_size.
+       * target.h (Target::hash_entry_size): New method.
+       (Target::Target_info::hash_entry_size): New data member.
+
+       * aarch64.cc (Target_aarch64::aarch64_info): Add hash_entry_size.
+       * arm.cc (Target_arm::arm_info): Likewise.
+       (Target_arm_nacl::arm_nacl_info): Likewise.
+       * i386.cc (Target_i386::i386_info): Likewise.
+       (Target_i386_nacl::i386_nacl_info): Likewise.
+       (Target_iamcu::iamcu_info): Likewise.
+       * mips.cc (Target_mips::mips_info): Likewise.
+       (Target_mips_nacl::mips_nacl_info): Likewise.
+       * powerpc.cc (Target_powerpc::powerpc_info): Likewise.
+       * sparc.cc (Target_sparc::sparc_info): Likewise.
+       * tilegx.cc (Target_tilegx::tilegx_info): Likewise.
+       * x86_64.cc (Target_x86_64::x86_64_info): Likewise.
+       (Target_x86_64_nacl::x86_64_nacl_info): Likewise.
+       * testsuite/testfile.cc (Target_test::test_target_info): Likewise.
+
+2015-10-28  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gold/19177
+       * i386.cc (Target_i386::Relocate::relocate): Check R_386_GOT32
+       and R_386_GOT32X relocations without base register.
+
+2015-10.27  Han Shen  <shenhan@google.com>
+
+       PR gold/19042 - unsupported reloc 311/312.
+
+       * aarch64.cc (Target_aarch64::Scan::local): Add support for
+       reloc 311/312.
+
+2015-10-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * x86_64.cc (Target_x86_64<size>::Scan::get_reference_flags):
+       Treat R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX the same
+       as R_X86_64_GOTPCREL.
+       (Target_x86_64<size>::Scan::local): Likewise.
+       (Target_x86_64<size>::Scan::possible_function_pointer_reloc):
+       Likewise.
+       (Target_x86_64<size>::Scan::global): Likewise.
+       (Target_x86_64<size>::Relocate::relocate): Likewise.
+       (Target_x86_64<size>::Relocatable_size_for_reloc::get_size_for_reloc):
+       Likewise.
+
+2015-10-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * i386.cc (Target_i386::Scan::get_reference_flags(): Treat
+       R_386_GOT32X the same as R_386_GOT32.
+       (Target_i386::Scan::local): Likewise.
+       (Target_i386::Scan::possible_function_pointer_reloc): Likewise.
+       (Target_i386::Scan::global): Likewise.
+       (Target_i386::Relocate::relocate): Likewise.
+       (Target_i386::Relocatable_size_for_reloc::get_size_for_reloc):
+       Likewise.
+
+2015-10-20  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * testsuite/Makefile.am (x86_64_mov_to_lea11): Replace
+       x86_64_mov_to_lea1.o with x86_64_mov_to_lea2.o.
+       (x86_64_mov_to_lea12): Replace x86_64_mov_to_lea2.o with
+       x86_64_mov_to_lea1.o.
+       * testsuite/Makefile.in: Regenerated.
+
+2015-10-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gold/19119
+       * options.h (General_options): Remove "obsolete" from -m.
+       * parameters.cc (set_parameters_target): Check if input target
+       is compatible with output emulation set by "-m emulation".
+
+2015-10-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gold/19118
+       * i386.cc (Target_iamcu): New class.
+       (Target_selector_iamcu): Likewise.
+       (Target_iamcu::iamcu_info): New variable.
+       (target_selector_iamcu): Likewise.
+
+2015-10-07  Andreas Schwab  <schwab@suse.de>
+
+       * aarch64.cc (aarch64_info): Set abi_pagesize to 64K.
+
+2015-10-06  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/18855
+       * sparc.cc (Sparc_relocate_functions::gdop_hix22): Remove addend
+       parameter.
+       (Sparc_relocate_functions::gdop_lox10): Likewise.
+       (Target_sparc::Relocate::relocate): Use addend when computing
+       symbol value for R_SPARC_GOTDATA_OP*.
+
+2015-09-07  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/18930
+       PR gold/18886
+       * resolve.cc (Symbol::override_base): Don't convert IFUNC symbols here.
+       * symtab.cc (Symbol_table::add_from_dynobj): Convert them here instead.
+
+2015-09-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gold/18886
+       * resolve.cc (Symbol::override_base): Turn IFUNC symbols from
+       shared libraries into normal FUNC symbols.
+       * symtab.cc (Symbol_table::sized_write_symbol): Assert IFUNC
+       symbols aren't from shared libraries.
+
+2015-09-02  Alan Modra  <amodra@gmail.com>
+
+       PR 18878
+       * powerpc.cc (Target_powerpc): Add savres_section_ and accessor.
+       (Target_powerpc::Branch_info::make_stub): Determine whether long
+       branch stub is for save/restore function.
+       (Branch_stub_ent): Add save_res_, and extra parm to constructor.
+       (Stub_table): Add need_save_res_.
+       (Stub_table:clear_stubs): Clear need_save_res_.
+       (Stub_table:set_address_and_size): Add save/restore section size.
+       (Stub_table::add_long_branch_entry): Add save_res param.  Set
+       need_save_res_, but don't add space for save/restore stubs.
+       (Stub_table::find_long_branch_entry): Return offset to local copy
+       of save/restore func.
+       (Stub_table::do_write): Don't output save/restore stubs.  Instead
+       copy the save/restore functions.
+       (Output_data_save_res:contents): New accessor.
+       (Target_powerpc::define_save_restore_funcs): Set savres_section_.
+
+2015-08-25  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/18847
+       * script-sections.cc (Memory_region::set_address): New method.
+       (Script_sections::find_memory_region): Add explicit_only parameter.
+       (Output_section_definition::set_section_addresses): Handle case where
+       script specifies both address and vma region.
+       * script-sections.h (Script_sections::find_memory_region): Add
+       explicit_only parameter.
+
+2015-08-25  Cary Coutant  <ccoutant@gmail.com>
+
+       PR gold/18859
+       * object.cc (Input_objects::add_object): Store objects in a map,
+       indexed by soname; update as-needed flag when necessary.
+       * object.h (Object::clear_as_needed): New method.
+       (Input_objects::so_names_): Change from set to map.
+
 2015-08-25  Cary Coutant  <ccoutant@gmail.com>
 
        PR gold/14746