ELF: Call check_relocs after opening all inputs
[deliverable/binutils-gdb.git] / bfd / ChangeLog
index 0dc2f44a4555d298fe5763b3447f592e8e3f9a83..364a36d24b01fc1b44b44726bd4d684c98ae5ff6 100644 (file)
@@ -1,3 +1,240 @@
+2017-10-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
+       * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
+       (bfinfdpic_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
+       from comments.
+       (elf_m68k_remove_got_entry_type): Removed.
+       (elf_m68k_find_got_entry_ptr): Likewise.
+       (elf_m68k_remove_got_entry): Likewise.
+       (elf_m68k_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
+       * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
+       (ppc64_elf_gc_sweep_hook): Likewise.
+       * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
+       * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
+       * elflink.c (elf_link_add_object_symbols): Don't call
+       _bfd_elf_link_check_relocs here.
+       (gc_sweep_hook_fn): Removed.
+       (elf_gc_sweep): Remove gc_sweep_hook.
+       * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
+       * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
+       (elf_backend_gc_sweep_hook): Likewise.
+       * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
+       * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
+       * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
+       (elfNN_bed): Remove elf_backend_gc_sweep_hook.
+       * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
+       * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
+
+2017-10-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-i386.c (elf_i386_backend_data): Removed.
+       (get_elf_i386_backend_data): Likewise.
+       (elf_i386_arch_bed): Replace elf_i386_backend_data with
+       elf_x86_backend_data.
+       (elf_i386_get_synthetic_symtab): Likewise.
+       (elf_i386_nacl_arch_bed): Likewise.
+       (elf_i386_vxworks_arch_bed): Likewise.
+       (elf_i386_relocate_section): Check target_os instead of
+       is_vxworks.
+       (elf_i386_finish_dynamic_symbol): Likewise.
+       (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
+       Check target_os instead of is_vxworks.
+       (elf_i386_link_setup_gnu_properties): Remove normal_target and
+       is_vxworks.  Initialize plt0_pad_byte.
+       * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
+       (get_elf_x86_64_arch_data): Likewise.
+       (get_elf_x86_64_backend_data): Likewise.
+       (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
+       elf_x86_backend_data.
+       (elf_x86_64_get_synthetic_symtab): Likewise.
+       (elf_x86_64_nacl_arch_bed): Likewise.
+       (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
+       normal_target.  Initialize plt0_pad_byte.
+       * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
+       instead of is_vxworks.
+       (_bfd_x86_elf_size_dynamic_sections): Likewise.
+       (_bfd_x86_elf_finish_dynamic_sections): Likewise.
+       (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
+       (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
+       (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
+       Update normal_target.  Set up plt0_pad_byte.  Check target_os
+       instead of is_vxworks.
+       * elfxx-x86.h (elf_x86_target_os): New.
+       (elf_x86_backend_data): Likewise.
+       (get_elf_x86_backend_data): Likewise.
+       (elf_x86_link_hash_table): Remove is_vxworks.  Add plt0_pad_byte
+       and target_os.
+       (elf_x86_init_table): Remove normal_target and is_vxworks.  Add
+       plt0_pad_byte.
+
+2017-10-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
+       _bfd_x86_elf_finish_dynamic_sections.
+       * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
+       * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
+       function.
+       * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
+       prototype.
+
+2017-10-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/21384
+       * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
+       hide symbol which was forced to be dynamic.
+
+2017-10-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/22269
+       * elf32-cris.c (cris_elf_relocate_section): Don't generate
+       dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       (cris_elf_check_relocs): Don't allocate dynamic relocation
+       if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+
+2017-10-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/22269
+       * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
+       if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       (sh_elf_relocate_section): Don't generate dynamic relocation if
+       UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+
+2017-10-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/22269
+       * elf32-s390.c (allocate_dynrelocs): Discard dynamic
+       relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       (elf_s390_relocate_section): Don't generate dynamic relocation
+       if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       * elf64-s390.c (allocate_dynrelocs): Discard dynamic
+       relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       (elf_s390_relocate_section): Don't generate dynamic relocation
+       if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+
+2017-10-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/22269
+       * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
+       dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       (allocate_dynrelocs): Discard dynamic relocations if
+       UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+
+2017-10-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/22269
+       * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
+       generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
+       true.
+       (allocate_dynrelocs): Discard dynamic relocations if
+       UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+
+2017-10-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/22269
+       * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
+       relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
+       UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       (elf_m68k_relocate_section): Don't generate dynamic relocation
+       if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+
+2017-10-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/22269
+       * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
+       symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       (allocate_dynrelocs): Discard dynamic relocations if
+       UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       (elf32_hppa_relocate_section): Don't generate dynamic
+       relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+
+2017-10-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/22269
+       * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
+       dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       (allocate_fptr): Don't allocate function pointer if
+       UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       (allocate_dynrel_entries): Don't allocate dynamic relocation
+       if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       (set_got_entry): Don't set GOT entry if
+       UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       (set_pltoff_entry): Don't set PLTOFF entry if
+       UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       (elfNN_ia64_relocate_section): Don't install dynamic relocation
+       UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+
+2017-10-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/22269
+       * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
+       dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       (allocate_dynrelocs): Don't allocate dynamic relocations if
+       UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+
+2017-10-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/22269
+       * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
+       dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+       (allocate_dynrelocs_for_symbol): Discard dynamic relocations
+       if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
+
 2017-10-14  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/22269
This page took 0.025371 seconds and 4 git commands to generate.