summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf32-ppc.c8
2 files changed, 9 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 4582b8c5086..eb32e2dd679 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2019-03-18 Alan Modra <amodra@gmail.com>
+
+ PR 24355
+ * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
+ for local iplt syms with ent->plt.offset == -1. Remove ineffective
+ attempt at writing glink stubs only once.
+
2019-02-18 Nick Clifton <nickc@redhat.com>
Import from the mainline:
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 5e9251bdb9f..f4a329a1327 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -10828,6 +10828,7 @@ ppc_finish_symbols (struct bfd_link_info *info)
bfd_byte *loc;
bfd_vma val;
Elf_Internal_Rela rela;
+ unsigned char *p;
if (!get_sym_h (NULL, &sym, &sym_sec, NULL, &local_syms,
lplt - local_plt, ibfd))
@@ -10872,14 +10873,9 @@ ppc_finish_symbols (struct bfd_link_info *info)
loc = relplt->contents + (relplt->reloc_count++
* sizeof (Elf32_External_Rela));
bfd_elf32_swap_reloca_out (info->output_bfd, &rela, loc);
- }
- if ((ent->glink_offset & 1) == 0)
- {
- unsigned char *p = ((unsigned char *) htab->glink->contents
- + ent->glink_offset);
+ p = (unsigned char *) htab->glink->contents + ent->glink_offset;
write_glink_stub (NULL, ent, htab->elf.iplt, p, info);
- ent->glink_offset |= 1;
}
}