x86: Check plt_got before using .plt.got
[binutils-gdb.git] / bfd / ChangeLog
index c75897c2558edecb089d6a7057dccad42afe978e..75e1e38dfbba3b680f4d5f1bb22949cb440b1fe4 100644 (file)
@@ -1,3 +1,104 @@
+2017-04-28  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
+       before using .plt.got.
+       * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
+
+2017-04-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
+       instead of "+=" to update 0.
+
+2017-04-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
+       .plt.got section here.
+       (elf_i386_check_relocs): Don't create the .plt.got section.
+       * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
+       the .plt.got and .plt.bnd sections here.
+       (elf_x86_64_check_relocs): Don't create the .plt.got nor
+       .plt.bnd sections.
+
+2017-04-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
+       has_bnd_reloc.
+       (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
+       (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
+       (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
+       (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
+       has_bnd_reloc.
+
+2017-04-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
+       to return bfd *.
+       (_bfd_elf_link_setup_gnu_properties): Return bfd *.
+       * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
+       the first relocatable ELF input with GNU properties.
+
+2017-04-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
+       VxWorks for non-PIC.
+
+2017-04-27  Alan Modra  <amodra@gmail.com>
+
+       * elf-bfd.h (struct elf_backend_data): Make asection param of
+       elf_backend_eh_frame_address_size const.
+       (_bfd_elf_eh_frame_address_size): Likewise.
+       * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
+       * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
+       * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
+       * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
+       * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
+       (next_cie_fde_offset): Constify params.
+       (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
+
+2017-04-27  Alan Modra  <amodra@gmail.com>
+
+       * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
+       (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
+       * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
+       aug_data_len.
+       (offset_adjust): New function.
+       (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
+       (adjust_eh_frame_local_symbols): Likewise.
+       (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
+       after changing anything.  Return true if anything changed.
+       * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
+       _bfd_elf_adjust_eh_frame_global_symbol for globals.
+
+2017-04-27  Alan Modra  <amodra@gmail.com>
+
+       * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
+       when force_local.
+
+2017-04-27  Alan Modra  <amodra@gmail.com>
+
+       * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
+       (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
+       (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
+       (ppc_elf_relocate_section): Likewise.  Delete silly optimisation
+       for undef and undefweak dyn_relocs.
+       * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
+       (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
+       (allocate_got, allocate_dynrelocs): Likewise.
+       (ppc64_elf_relocate_section): Likewise.
+
+2017-04-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
+       DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
+       * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
+       add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
+
+2017-04-26  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/21434
+       * reloc.c (bfd_perform_relocation): Check for a negative address
+       in the reloc.
+
 2017-04-26  Maciej W. Rozycki  <macro@imgtec.com>
 
        PR ld/21334