x86: Only allow S + A relocations against absolute symbol
[deliverable/binutils-gdb.git] / bfd / ChangeLog
index 7f04a97daac8a2c5f1c962bf2519dc4e07adb28b..2ed10465791c9c768d6f29725b55319664ac9803 100644 (file)
@@ -1,3 +1,112 @@
+2020-04-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/25749
+       PR ld/25754
+       * elf32-i386.c (elf_i386_convert_load_reloc): Convert load
+       relocation to R_386_32 for relocation against non-preemptible
+       absolute symbol.
+       (elf_i386_check_relocs): Call _bfd_elf_x86_valid_reloc_p.  Don't
+       allocate dynamic relocation for non-preemptible absolute symbol.
+       (elf_i386_relocate_section): Pass sec to
+       GENERATE_DYNAMIC_RELOCATION_P.
+       * elf64-x86-64.c (R_X86_64_converted_reloc_bit): Moved.
+       (elf_x86_64_convert_load_reloc): Covert load relocation to
+       R_X86_64_32S or R_X86_64_32 for relocation against non-preemptible
+       absolute symbol.  Don't convert to R_X86_64_32S nor R_X86_64_32
+       for non-preemptible absolute symbol if they overflow.
+       (elf_x86_64_check_relocs): Call _bfd_elf_x86_valid_reloc_p.  Set
+       tls_type for GOT slot to GOT_ABS for non-preemptible absolute
+       symbol.  Don't allocate dynamic relocation for non-preemptible
+       absolute symbol.
+       (elf_x86_64_relocate_section): Don't generate relative relocation
+       for GOTPCREL relocations aganst local absolute symbol.  Pass sec
+       to GENERATE_DYNAMIC_RELOCATION_P.
+       * elfxx-x86.c (elf_x86_allocate_dynrelocs): No dynamic relocation
+       against non-preemptible absolute symbol.
+       (_bfd_elf_x86_valid_reloc_p): New function.
+       (_bfd_x86_elf_size_dynamic_sections): No dynamic relocation for
+       GOT_ABS GOT slot.
+       * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Add an SEC
+       argument.  Don't generate dynamic relocation against
+       non-preemptible absolute symbol.
+       (ABS_SYMBOL_P): New.
+       (GENERATE_RELATIVE_RELOC_P): Don't generate relative relocation
+       against non-preemptible absolute symbol.
+       (GOT_ABS): New.
+       (R_X86_64_converted_reloc_bit): New.  Moved from elf64-x86-64.c.
+       (_bfd_elf_x86_valid_reloc_p): New.
+
+2020-04-01  Tamar Christina  <tamar.christina@arm.com>
+
+       PR ld/16017
+       * elf32-arm.c (elf32_arm_populate_plt_entry): Set LSB of the PLT0
+       address in the GOT if in thumb only mode.
+
+2020-04-01  Tamar Christina  <tamar.christina@arm.com>
+
+       * elf32-arm.c (elf32_thumb2_plt_entry): Fix PC-rel offset.
+
+2020-04-01  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       * mmo.c (mmo_scan): Create .text section only when needed, not
+       from the start.
+
+2020-03-31  Alan Modra  <amodra@gmail.com>
+
+       * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread
+       return value check.
+
+2020-03-31  Alan Modra  <amodra@gmail.com>
+
+       * vms-alpha.c (image_write): Check bounds for sections without
+       contents too.  Error on non-zero write to section without
+       contents.
+       (_bfd_vms_slurp_etir): Check return of image_write* functions.
+
+2020-03-31  Alan Modra  <amodra@gmail.com>
+
+       * tekhex.c (pass_over): Check is_eof before reading buffer.
+
+2020-03-30  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/pr25662
+       * libcoff-in.h (struct pe_tdata): Rename the insert_timestamp
+       field to timestamp and make it an integer.
+       * libcoff.h: Regenerate.
+       * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Test the timestamp
+       field in the pe_data structure rather than the insert_timestamp
+       field.
+
+2020-03-30  Alan Modra  <amodra@gmail.com>
+
+       PR 25745
+       * elf64-ppc.c (ppc64_elf_build_stubs): Use asprintf to form
+       statistics message.
+
+2020-03-26  Nick Clifton  <nickc@redhat.com>
+
+       * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): Delete.
+       * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Remove
+       prototype.
+       * libbfd.h: Regenerate.
+
+2020-03-26  Alan Modra  <amodra@gmail.com>
+
+       * i386msdos.c (msdos_object_p): Catch -1 return from bfd_bread.
+
+2020-03-26  Alan Modra  <amodra@gmail.com>
+
+       * vms-alpha.c (dst_define_location): Limit size of dst_ptr_offsets
+       array.
+       (_bfd_vms_slurp_object_records): Rename "err" to "ok".
+
+2020-03-25  Nick Clifton  <nickc@redhat.com>
+
+       * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): New
+       function.
+       * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Prototype.
+       * libbfd.h: Regenerate.
+
 2020-03-25  Shahab Vahedi  <shahab@synopsys.com>
 
        * elf32-arc.c (PRINT_DEBUG_RELOC_INFO_BEFORE): Use the
This page took 0.035355 seconds and 4 git commands to generate.