PowerPC64 DT_RELR local PLT
authorAlan Modra <amodra@gmail.com>
Wed, 19 Jan 2022 02:58:04 +0000 (13:28 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 19 Jan 2022 06:15:45 +0000 (16:45 +1030)
Similarly to the local GOT case.

* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
space for PLT relocs against local syms when enable_dt_relr.

bfd/elf64-ppc.c

index 0ac96afe5a3c6723b2467e32385a12a7d7510c08..dccd535dbb098925a2845080a3bc96e993e15e45 100644 (file)
@@ -10356,7 +10356,8 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd,
                    s = htab->pltlocal;
                    ent->plt.offset = s->size;
                    s->size += LOCAL_PLT_ENTRY_SIZE (htab);
-                   if (bfd_link_pic (info))
+                   if (bfd_link_pic (info)
+                       && !(info->enable_dt_relr && !htab->opd_abi))
                      htab->relpltlocal->size += sizeof (Elf64_External_Rela);
                  }
              }