aix: implement R_TOCU and R_TOCL relocations
[deliverable/binutils-gdb.git] / bfd / ChangeLog
index e0fa5a3bf4a3beec2e599259fe6954c928b03b6c..d955f78a980e0fea3f85816f83b87ce4d35623b7 100644 (file)
@@ -1,3 +1,369 @@
+2021-03-12  Clément Chigot  <clement.chigot@atos.net>
+
+       * reloc.c (BFD_RELOC_PPC_TOC16_HI, BFD_RELOC_PPC_TOC16_LO):
+       New relocations.
+       * bfd-in2.h: Regenerate.
+       * libbfd.h: Regenerate.
+       * coff-rs6000.c (xcoff_calculate_relocation): Call
+       xcoff_reloc_type_toc for R_TOCU and R_TOCL.
+       (xcoff_howto_table): Remove src_mask for TOC relocations.
+       Add R_TOCU and R_TOCL howtos.
+       (_bfd_xcoff_reloc_type_lookup): Add cases for
+       BFD_RELOC_PPC_TOC16_HI and BFD_RELOC_PPC_TOC16_LO.
+       (xcoff_reloc_type_toc): Compute the whole offset.
+       Implement R_TOCU and R_TOCL.
+       * coff64-rs6000.c (xcoff64_calculate_relocation):
+       Likewise.
+       (xcoff64_howto_table): Likewise.
+       (xcoff64_reloc_type_lookup): Likewise.
+
+2021-03-12  Clément Chigot  <clement.chigot@atos.net>
+
+       * coff-rs6000.c (xcoff_calculate_relocation): Correct and
+       add new relocations.
+       (xcoff_howto_table): Likewise.
+       (xcoff_rtype2howto): Increase r_type maximum value.
+       (xcoff_ppc_relocate_section): Reuse predefined HOWTOs instead
+       of create a new one from scratch.  Enable only some relocations
+       to have a changing r_size.
+       * coff64-rs6000.c (xcoff64_calculate_relocation): Likewise.
+       (xcoff64_howto_table): Likewise.
+       (xcoff64_rtype2howto): Likewise.
+       (xcoff64_ppc_relocate_section): Likewise.
+       * libxcoff.h (XCOFF_MAX_CALCULATE_RELOCATION): Fix value.
+
+2021-03-12  Clément Chigot  <clement.chigot@atos.net>
+
+       * coff64-rs6000.c (xcoff64_ppc_relocate_section): Move.
+
+2021-03-12  Clément Chigot  <clement.chigot@atos.net>
+
+       * coff64-rs6000.c (xcoff64_write_object_contents): Remove.
+       * coffcode.h (coff_write_object_contents): Add bfd_mach_ppc_620
+       support for o_cputype field.  Avoid creating an empty a.out header
+       for XCOFF64.
+
+2021-03-12  Clément Chigot  <clement.chigot@atos.net>
+
+       * coff64-rs6000.c (xcoff64_create_csect_from_smclas): Add
+       missing smclass.
+
+2021-03-11  Nelson Chu  <nelson.chu@sifive.com>
+
+       * elfnn-riscv.c (riscv_elf_link_hash_table): New boolean
+       restart_relax, used to check if we need to run the whole
+       relaxations from relax pass 0 to 2 again.
+       (riscv_elf_link_hash_table_create): Init restart_relax to FALSE.
+       (_bfd_riscv_relax_align): Remove obsolete sec_flg0 set.
+       (_bfd_riscv_relax_delete): Set again to TRUE if we do delete the code.
+       (bfd_elfNN_riscv_restart_relax_sections): New function.  Called by
+       after_allocation to check if we need to run the whole relaxations again.
+       (_bfd_riscv_relax_section): We will only enter into the relax pass 3
+       when the restart_relax is FALSE; At last set restart_relax to TRUE if
+       again is TRUE, too.
+       * elfxx-riscv.h (bfd_elf32_riscv_restart_relax_sections): Declaration.
+       (bfd_elf64_riscv_restart_relax_sections): Likewise.
+
+2021-03-10  Jan Beulich  <jbeulich@suse.com>
+
+       * cofflink.c (_bfd_coff_write_global_sym): Range-check symbol
+       offset.
+
+2021-03-10  Alan Modra  <amodra@gmail.com>
+           Jan Beulich  <jbeulich@suse.com>
+
+       * elf.c (bfd_elf_generic_reloc): Make references between debug
+       sections use section relative values.
+
+2021-03-09  Jan Beulich  <jbeulich@suse.com>
+
+       * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Diagnose out of range RVA.
+
+2021-03-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/27425
+       PR ld/27432
+       * bfd.c (_bfd_get_link_info): New function.
+       * elf-bfd.h (output_elf_obj_tdata): Add link_info.
+       (elf_link_info): New.
+       * libbfd-in.h (_bfd_get_link_info): New prototype.
+       * coff-x86_64.c (coff_amd64_reloc): Also subtract __ImageBase for
+       R_AMD64_IMAGEBASE when generating x86-64 ELF executable.
+       * pe-x86_64.c: Include "coff/internal.h" and "libcoff.h".
+       (pex64_link_add_symbols): New function.
+       (coff_bfd_link_add_symbols): New macro.
+       * libbfd.h: Regenerated.
+
+2021-03-05  Craig Blackmore  <craig.blackmore@embecosm.com>
+           Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * elf-bfd.h (elfcore_write_riscv_csr): Declare.
+       * elf.c (elfcore_grok_riscv_csr): New function.
+       (elfcore_grok_note): Handle NT_RISCV_CSR.
+       (elfcore_write_riscv_csr): New function.
+       (elfcore_write_register_note): Handle '.reg-riscv-csr'.
+
+2021-03-05  Craig Blackmore  <craig.blackmore@embecosm.com>
+           Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * elfnn-riscv.c (PRPSINFO_PR_FNAME_LENGTH): Define.
+       (PRPSINFO_PR_PSARGS_LENGTH): Define.
+       (riscv_write_core_note): New function.
+       (riscv_elf_grok_psinfo): Make use of two new length defines.
+       (elf_backend_write_core_note): Define.
+
+2021-03-05  Craig Blackmore  <craig.blackmore@embecosm.com>
+           Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * elf-bfd.h (elfcore_write_gdb_tdesc): Declare new function.
+       * elf.c (elfcore_grok_gdb_tdesc): New function.
+       (elfcore_grok_note): Handle NT_GDB_TDESC.
+       (elfcore_write_gdb_tdesc): New function.
+       (elfcore_write_register_note): Handle NT_GDB_TDESC.
+
+2021-03-05  Nick Clifton  <nickc@redhat.com>
+
+       PR 27521
+       * dwarf2.c (is_str_attr): Add DW_FORM_strx* forms.
+       (read_indexed_string): Placeholder function.
+       (read_attribute_value): Handle DW_FORM_strx* and DW_FORM_addrx*
+       forms.
+
+2021-03-05  Alan Modra  <amodra@gmail.com>
+
+       * reloc.c (bfd_perform_relocation): Revert 2021-01-12 and
+       2020-09-16 changes.
+       * coff-x86_64.c (coff_amd64_reloc): Do more or less the same
+       adjustments here instead.  Separate pc-relative adjustments
+       from symbol related adjustments.  Tidy comments and formatting.
+
+2021-03-04  Jan Beulich  <jbeulich@suse.com>
+
+       * coffcode.h (sec_to_styp_flags): Don't set IMAGE_SCN_LNK_* in
+       final PE images.
+
+2021-03-04  Alan Modra  <amodra@gmail.com>
+
+       * rs6000-core.c (rs6000coff_core_p): Correct prototype.
+
+2021-03-03  Alan Modra  <amodra@gmail.com>
+
+       PR 27500
+       * elflink.c (_bfd_elf_gc_mark_rsec): Do special start/stop
+       processing not when start/stop symbol section is unmarked but
+       on first time a start/stop symbol is processed.
+
+2021-03-03  Alan Modra  <amodra@gmail.com>
+
+       * reloc.c: Include x86_64.h rather than internal.h.
+
+2021-03-02  Nick Clifton  <nickc@redhat.com>
+
+       PR 27484
+       * dwarf2.c (scan_unit_for_symbols): Scan twice, once to accumulate
+       function and variable tags and a second time to resolve their
+       attributes.
+
+2021-03-02  Nick Alcock  <nick.alcock@oracle.com>
+
+       * elf-strtab.c (_bfd_elf_strtab_str): Skip strings with zero refcount.
+
+2021-03-02  Alan Modra  <amodra@gmail.com>
+
+       PR 27451
+       * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore synthesized
+       linker defined start/stop symbols when start_stop_gc.
+
+2021-03-02  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got
+       indirect to pc-relative or toc-relative for undefined symbols.
+
+2021-03-01  Alan Modra  <amodra@gmail.com>
+           Fangrui Song <maskray@google.com>
+
+       * elflink.c (_bfd_elf_gc_mark_rsec): Ignore synthesized linker
+       defined start/stop symbols when start_stop_gc.
+       (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
+       (bfd_elf_define_start_stop): Don't modify ldscript_def syms.
+       * linker.c (bfd_generic_define_start_stop): Likewise.
+
+2021-02-25  Alan Modra  <amodra@gmail.com>
+
+       PR 27441
+       * elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak.
+       * elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and
+       use when deciding an as-needed library should be loaded instead
+       of using the binding of the library definition.
+
+2021-02-24  Alan Modra  <amodra@gmail.com>
+
+       PR 27459
+       * coff-stgo32.c (go32exe_check_format): Sanity check size of
+       header to avoid a buffer overflow.
+
+2021-02-22  Alan Modra  <amodra@gmail.com>
+
+       * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Remove BFD_RELOC_16.
+       * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
+
+2021-02-19  Nelson Chu  <nelson.chu@sifive.com>
+
+       PR 27158
+       * elfnn-riscv.c (perform_relocation): Updated encoding macros.
+       (_bfd_riscv_relax_call): Likewise.
+       (_bfd_riscv_relax_lui): Likewise.
+       * elfxx-riscv.c (howto_table): Likewise.
+
+2021-02-18  Nelson Chu  <nelson.chu@sifive.com>
+
+       * Makefile.am: Added cpu-riscv.h.
+       * Makefile.in: Regenerated.
+       * po/SRC-POTFILES.in: Regenerated.
+       * cpu-riscv.h: Added to support spec versions controlling.
+       Also added extern arrays and functions for cpu-riscv.c.
+       (enum riscv_spec_class): Define all spec classes here uniformly.
+       (struct riscv_spec): Added for all specs.
+       (RISCV_GET_SPEC_CLASS): Added to reduce repeated code.
+       (RISCV_GET_SPEC_NAME): Likewise.
+       (RISCV_GET_ISA_SPEC_CLASS): Added to get ISA spec class.
+       (RISCV_GET_PRIV_SPEC_CLASS): Added to get privileged spec class.
+       (RISCV_GET_PRIV_SPEC_NAME): Added to get privileged spec name.
+       * cpu-riscv.c (struct priv_spec_t): Replaced with struct riscv_spec.
+       (riscv_get_priv_spec_class): Replaced with RISCV_GET_PRIV_SPEC_CLASS.
+       (riscv_get_priv_spec_name): Replaced with RISCV_GET_PRIV_SPEC_NAME.
+       (riscv_priv_specs): Moved below.
+       (riscv_get_priv_spec_class_from_numbers): Likewise, updated.
+       (riscv_isa_specs): Moved from include/opcode/riscv.h.
+       * elfnn-riscv.c: Included cpu-riscv.h.
+       (riscv_merge_attributes): Initialize in_priv_spec and out_priv_spec.
+       * elfxx-riscv.c: Included cpu-riscv.h and opcode/riscv.h.
+       (RISCV_UNKNOWN_VERSION): Moved from include/opcode/riscv.h.
+       * elfxx-riscv.h: Removed extern functions to cpu-riscv.h.
+
+2021-02-17  Alan Modra  <amodra@gmail.com>
+
+       * wasm-module.c: Guard include of limits.h.
+       (CHAR_BIT): Provide backup define.
+       (wasm_read_leb128): Use CHAR_BIT to size "result" in bits.
+       Correct signed overflow checking.
+
+2021-02-17  Nelson Chu  <nelson.chu@sifive.com>
+
+       PR 27200
+       * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Delay
+       copying the elf flags from input BFD to output BFD, until we have
+       checked if the input BFD has no code section or not.  Also fix the
+       problem that we only check the first section rather than the entire
+       sections for input BFD.
+
+2021-02-16  Alan Modra  <amodra@gmail.com>
+
+       * libbfd.c (_bfd_read_unsigned_leb128): Avoid excessive shift.
+       (_bfd_safe_read_leb128, _bfd_read_signed_leb128): Likewise.
+
+2021-02-15  Jan Beulich  <jbeulich@suse.com>
+
+       * doc/Makefile.am: Replace "cp -p" by "$(LN_S)".
+       * doc/Makefile.in: Re-generate.
+
+2021-02-15  Alan Modra  <amodra@gmail.com>
+
+       * elf32-nds32.c (nds32_get_section_contents): Replace
+       bfd_malloc_and_get_section with bfd_get_full_section_contents.
+       (nds32_elf_relax_delete_blanks): Init contents.
+       (nds32_elf_relax_section, nds32_relax_fp_as_gp): Likewise.
+
+2021-02-15  Alan Modra  <amodra@gmail.com>
+
+       * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
+       bfd_get_full_section_contents.
+
+2021-02-14  Alan Modra  <amodra@gmail.com>
+
+       * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Apply
+       all fixes to bfd_generic_get_relocated_section_contents since this
+       function was split out.
+
+2021-02-11  Alan Modra  <amodra@gmail.com>
+
+       * config.bfd: Remove ia64 from obsolete list.
+
+2021-02-11  Alan Modra  <amodra@gmail.com>
+
+       PR ld/22269
+       * elfnn-ia64.c: Revert 2017-10-14 git commit db41f6eb5234.
+
+2021-02-11  Alan Modra  <amodra@gmail.com>
+
+       PR 27294
+       * elf32-avr.c (avr_elf32_load_records_from_section): Use
+       bfd_malloc_and_get_section.  Use bfd_byte* vars and remove then
+       unnecessary casts.
+
+2021-02-11  Alan Modra  <amodra@gmail.com>
+
+       PR 27291
+       * section.c (bfd_get_section_contents): Avoid possible overflow
+       when range checking offset and count.
+       (bfd_set_section_contents): Likewise.
+
+2021-02-03  Nick Alcock  <nick.alcock@oracle.com>
+
+       * configure.ac (SHARED_LIBADD): Remove explicit -lintl population in
+       favour of LIBINTL.
+       * configure: Regenerated.
+
+2021-02-09  Alan Modra  <amodra@gmail.com>
+
+       * config.bfd (arm*-*-symbianelf*): Move from obsolete to removed.
+       * configure.ac: Delete symbian entries.
+       * elf-bfd.h (enum elf_target_os): Delete is_symbian.
+       * elf32-arm.c: Remove symbian support.  Formatting.
+       * targets.c: Delete symbian entries.
+       * configure: Regenerate.
+
+2021-02-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/19609
+       * elf64-x86-64.c (elf_x86_64_relocate_section): Provide more
+       info when failed to convert GOTPCREL relocation.
+
+2021-02-04  Nelson Chu  <nelson.chu@sifive.com>
+
+       * elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
+
+2021-02-04  Alan Modra  <amodra@gmail.com>
+
+       PR 27311
+       * elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
+       libraries for IR references on pass over libraries after LTO
+       recompilation.
+
+2021-02-03  Alan Modra  <amodra@gmail.com>
+
+       PR 27311
+       * elflink.c (_bfd_elf_add_default_symbol): Revert last two changes.
+       (elf_link_add_object_symbols): Here too.  Don't pull in as-needed
+       libraries when H is an indirect symbol after calling
+       _bfd_elf_add_default_symbol.
+
+2021-02-03  Alan Modra  <amodra@gmail.com>
+
+       PR 27311
+       * elflink.c (_bfd_elf_add_default_symbol): Clear override when
+       undecorated symbol will have a different version.
+
+2021-02-02  Alan Modra  <amodra@gmail.com>
+
+       PR 27311
+       * elflink.c (_bfd_elf_add_default_symbol): Add override parameter.
+       Use when handling default versioned symbol.  Rename existing
+       override variable to nondef_override and use for non-default
+       versioned symbol.
+       (elf_link_add_object_symbols): Adjust call to suit.  Don't
+       pull in as-needed libraries when override is set.
+
 2021-02-01  Emery Hemingway  <ehmry@posteo.net>
 
        * config.bfd: Add *-*-genode* as a target for AArch64 and x86.
This page took 0.048004 seconds and 4 git commands to generate.