Blame SOURCES/binutils-aarch64-plt-sh_entsize.patch

3dad3f
diff -rup binutils.orig/bfd/elfnn-aarch64.c binutils-2.35/bfd/elfnn-aarch64.c
3dad3f
--- binutils.orig/bfd/elfnn-aarch64.c	2020-07-30 17:20:30.607580720 +0100
3dad3f
+++ binutils-2.35/bfd/elfnn-aarch64.c	2020-07-30 17:22:45.629741124 +0100
3dad3f
@@ -9513,8 +9513,10 @@ elfNN_aarch64_init_small_plt0_entry (bfd
3dad3f
 
3dad3f
   memcpy (htab->root.splt->contents, htab->plt0_entry,
3dad3f
 	  htab->plt_header_size);
3dad3f
-  elf_section_data (htab->root.splt->output_section)->this_hdr.sh_entsize =
3dad3f
-    htab->plt_header_size;
3dad3f
+  /* PR 26312: Explicitly set the sh_entsize to 0 so that
3dad3f
+     consumers do not think that the section contains fixed
3dad3f
+     sized objects.  */
3dad3f
+  elf_section_data (htab->root.splt->output_section)->this_hdr.sh_entsize = 0;
3dad3f
 
3dad3f
   plt_got_2nd_ent = (htab->root.sgotplt->output_section->vma
3dad3f
 		  + htab->root.sgotplt->output_offset
3dad3f
@@ -9616,10 +9618,6 @@ elfNN_aarch64_finish_dynamic_sections (b
3dad3f
     {
3dad3f
       elfNN_aarch64_init_small_plt0_entry (output_bfd, htab);
3dad3f
 
3dad3f
-      elf_section_data (htab->root.splt->output_section)->
3dad3f
-	this_hdr.sh_entsize = htab->plt_entry_size;
3dad3f
-
3dad3f
-
3dad3f
       if (htab->root.tlsdesc_plt && !(info->flags & DF_BIND_NOW))
3dad3f
 	{
3dad3f
 	  BFD_ASSERT (htab->root.tlsdesc_got != (bfd_vma)-1);