From 2ce859a18d876f2e7ff256ae9004c5380c7b44f3 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 29 Mar 2007 01:11:30 +0000 Subject: [PATCH] PR ld/4267 * elf32-ppc.c (allocate_dynrelocs): Set plt.offset to -1 for unused entries. Don't clear plt.plist in loop. --- bfd/ChangeLog | 6 ++++++ bfd/elf32-ppc.c | 14 ++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e920c702407..7d9e2d86cf2 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2007-03-29 Alan Modra + + PR ld/4267 + * elf32-ppc.c (allocate_dynrelocs): Set plt.offset to -1 for + unused entries. Don't clear plt.plist in loop. + 2007-03-28 Richard Sandiford * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove append_rela. diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 2355687665d..d1cd431810a 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -4500,13 +4500,15 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) } else ent->plt.offset = (bfd_vma) -1; - - if (!doneone) - { - h->plt.plist = NULL; - h->needs_plt = 0; - } } + else + ent->plt.offset = (bfd_vma) -1; + + if (!doneone) + { + h->plt.plist = NULL; + h->needs_plt = 0; + } } else { -- 2.30.2