diff options
Diffstat (limited to 'bfd/elfnn-aarch64.c')
-rw-r--r-- | bfd/elfnn-aarch64.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 2c88f28..a1c8887 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -9509,8 +9509,11 @@ elfNN_aarch64_init_small_plt0_entry (bfd *output_bfd ATTRIBUTE_UNUSED, memcpy (htab->root.splt->contents, htab->plt0_entry, htab->plt_header_size); - elf_section_data (htab->root.splt->output_section)->this_hdr.sh_entsize = - htab->plt_header_size; + + /* PR 26312: Explicitly set the sh_entsize to 0 so that + consumers do not think that the section contains fixed + sized objects. */ + elf_section_data (htab->root.splt->output_section)->this_hdr.sh_entsize = 0; plt_got_2nd_ent = (htab->root.sgotplt->output_section->vma + htab->root.sgotplt->output_offset @@ -9612,10 +9615,6 @@ elfNN_aarch64_finish_dynamic_sections (bfd *output_bfd, { elfNN_aarch64_init_small_plt0_entry (output_bfd, htab); - elf_section_data (htab->root.splt->output_section)-> - this_hdr.sh_entsize = htab->plt_entry_size; - - if (htab->root.tlsdesc_plt && !(info->flags & DF_BIND_NOW)) { BFD_ASSERT (htab->root.tlsdesc_got != (bfd_vma)-1); |