PR22829, objcopy/strip removes PT_GNU_RELRO from lld binaries
[deliverable/binutils-gdb.git] / bfd / ChangeLog
index 2a0330c8a8f7abc7310a4cddcbcde0b02f777941..c93141458040a43bbcdf9e1350dc3ae26b234a27 100644 (file)
@@ -1,3 +1,245 @@
+2018-02-13  Alan Modra  <amodra@gmail.com>
+
+       PR 22829
+       * elf.c (assign_file_positions_for_non_load_sections): Rewrite
+       PT_GNU_RELRO setup.
+
+2018-02-12  Zebediah Figura  <z.figura12@gmail.com>
+
+       * i386msdos.c (msdos_mkobject); New function.
+       (msdos_object_p): New function.
+       (i386_msdos_vec): Use msdos_object_p as the check_format
+       function.
+       * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
+       NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
+       IMAGE_NT_SIGNATURE.
+       * peXXigen.c: Likewise.
+       * coff-ia64.c: Likewise.
+
+2018-02-12  Nick Clifton  <nickc@redhat.com>
+
+       * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
+       assignment.
+       * elf32-arc.c (elf_arc_relocate_section): Likewise.
+
+2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
+       (sparc_elf_append_rela): Assert that there is enough room in section.
+       (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
+       (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
+       (allocate_dynrelocs): Remove outdated comments and reorder conditions.
+       For a symbol subject to a GOT relocation, reserve a slot in the
+       relocation section if the symbol isn't dynamic and we are in PIC mode.
+       (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
+       is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
+       <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
+       <R_SPARC_PC10>: Reorder conditions.  Remove always-false assertion.
+       (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
+       resolved_to_zero.  Do not generate a dynamic GOT relocation for an
+       undefined weak symbol with non-default visibility.  Remove superfluous
+       'else' and fix formatting.
+
+2018-02-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
+       is_solaris.
+       (i386_elf32_sol2_vec): Don't declare.
+       (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
+       Don't set need_global_offset_table.
+       (elf_i386_solaris_arch_bed): New.
+       (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
+       Solaris.
+       * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
+       target_os != is_nacl instead of target_os == is_normal.
+       (x86_64_elf64_sol2_vec): Don't declare.
+       (elf_x86_64_link_setup_gnu_properties): Check target_os !=
+       is_nacl instead of target_os == is_normal.  Don't set
+       need_global_offset_table.
+       (elf_x86_64_solaris_arch_bed): New.
+       (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
+       Solaris.
+       * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
+       _GLOBAL_OFFSET_TABLE_ for Solaris.
+       (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
+       need_global_offset_table.
+       * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
+       (elf_x86_link_hash_table): Remove need_global_offset_table.
+       (elf_x86_init_table): Likewise.
+
+2018-02-08  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
+       Remove prototype.
+       (i386_elf32_sol2_vec): Declared.
+       (elf_i386_link_setup_gnu_properties): Set
+       need_global_offset_table with info->output_bfd->xvec.
+       * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
+       Remove prototype.
+       (x86_64_elf64_sol2_vec): Declared.
+       (elf_x86_64_link_setup_gnu_properties): Set
+       need_global_offset_table with info->output_bfd->xvec.
+
+2018-02-08  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
+       New prototype.
+       (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
+       for Solaris.
+       * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
+       New prototype.
+       (elf_x86_64_link_setup_gnu_properties): Set
+       need_global_offset_table for Solaris.
+       * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
+       unused _GLOBAL_OFFSET_TABLE_ for Solaris.
+       (_bfd_x86_elf_link_setup_gnu_properties): Copy
+       need_global_offset_table.
+       * elfxx-x86.h (elf_x86_link_hash_table): Add
+       need_global_offset_table.
+       (elf_x86_init_table): Likewise.
+
+2018-02-08  Jim Wilson  <jimw@sifive.com>
+
+       * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
+       change.
+
+2018-02-08  Nick Clifton  <nickc@redhat.com>
+
+       PR 22788
+       * elf.c (elf_parse_notes): Reject notes with excessuively large
+       alignments.
+
+2018-02-07  Alan Modra  <amodra@gmail.com>
+
+       Revert 2018-01-17  Alan Modra  <amodra@gmail.com>
+       * elf32-ppc.c: Remove speculation barrier support.
+       * elf32-ppc.h: Likewise.
+       * elf64-ppc.c: Likewise.
+       * elf64-ppc.h: Likewise.
+
+2018-02-06  Jim Wilson  <jimw@sifive.com>
+
+       * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
+       callback to report an error.
+
+2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR ld/22263
+       * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
+       into call to !bfd_link_executable and tidy up.
+       (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
+       <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
+       !bfd_link_executable.
+       <R_SPARC_TLS_IE_HI22>: Likewise.
+       <GOT relocations>: Remove useless code, tidy and merge related blocks.
+       <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
+       !bfd_link_executable.
+       <R_SPARC_WPLT30>: Tidy up.
+       (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
+       !bfd_link_executable.
+       (allocate_dynrelocs): Likewise.
+       (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
+       <R_SPARC_TLS_GD_HI22>: Merge into...
+       <R_SPARC_TLS_GD_LO10>: ...this.  Adjust 4th argument in call to
+       sparc_elf_tls_transition and remove redundant code.
+       <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
+       !bfd_link_executable.
+       <R_SPARC_TLS_LDO_HIX22>: Likewise.
+       <R_SPARC_TLS_LE_HIX22>: Likewise.  Tidy up.
+       <R_SPARC_TLS_LDM_CALL>: Likewise.
+       <R_SPARC_TLS_GD_CALL>: Likewise.  Tidy up.
+       <R_SPARC_TLS_GD_ADD>: Likewise.
+       <R_SPARC_TLS_LDM_ADD>: Likewise.
+       <R_SPARC_TLS_LDO_ADD>: Likewise.
+       <R_SPARC_TLS_IE_LD>: Likewise.
+
+2018-02-06  MiloÅ¡ Stojanović  <milos.stojanovic@rt-rk.com>
+
+       PR 22789
+       * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
+       functions failed to find the function name, try the generic elf
+       find function instead.
+
+2018-02-06  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+       * coff-rs6000.c (xcoff_write_archive_contents_old): Use
+       'memcpy' instead of 'strncpy' when writing the magic number.
+
+2018-02-06  Nick Clifton  <nickc@redhat.com>
+
+       PR 22794
+       * opncls.c (bfd_get_debug_link_info_1): Check the size of the
+       section before attempting to read it in.
+       (bfd_get_alt_debug_link_info): Likewise.
+
+2018-02-06  Paul Carroll  <pcarroll@codesourcery.com>
+
+       * bfd/dwarf2.c (find_abstract_name): Modified to return file and
+       line information in addition to name, if they can be found.
+
+2018-02-05  Renlin Li  <renlin.li@arm.com>
+
+       PR ld/22764
+       * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
+       R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
+       check for writeable section as well.
+
+2018-02-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/22782
+       * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
+       _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
+       undefined weak symbol to 0.
+       * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
+       if _GLOBAL_OFFSET_TABLE_ is referenced.
+       * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
+       got_referenced instead of ref_regular_nonweak.  Remove the
+       unused _GLOBAL_OFFSET_TABLE_ from symbol table.
+       * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
+
+2018-02-05  Maciej W. Rozycki  <macro@mips.com>
+
+       * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
+       initialize `hi_reloc'.
+
+2018-02-05  Maciej W. Rozycki  <macro@mips.com>
+
+       * elfxx-mips.c (_bfd_mips_elf_section_processing): For
+       SHT_MIPS_REGINFO sections don't assert the correct size and
+       report an error instead.
+
+2018-02-05  Maciej W. Rozycki  <macro@mips.com>
+
+       * elf.c (_bfd_elf_write_object_contents): Propagate a failure
+       status from `->elf_backend_section_processing'.
+
+2018-02-02  Jim Wilson  <jimw@sifive.com>
+
+       PR ld/22756
+       * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
+       If link_info->wrap_hash, check for a duplicate symbol and ignore.
+       (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
+       Pass new argument to riscv_relax_delete_bytes.
+       (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise.  Remove
+       ATTRIBUTE_UNUSED from link_info parameter.
+
+2018-02-02  Alan Modra  <amodra@gmail.com>
+
+       * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
+       emitted for toc sequence optimization.  Set and use "howto" later.
+
+2018-02-01  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
+       arithmetic on NULL pointer.
+       * elflink.c (_bfd_elf_archive_symbol_lookup,
+       elf_link_add_archive_symbols): Likewise.
+
+2018-01-31  Michael Matz  <matz@suse.de>
+
+       * elflink.c (bfd_elf_define_start_stop): Fix check of
+       def_dynamic.
+
 2018-01-31  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/21964
This page took 0.033791 seconds and 4 git commands to generate.