aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2007-03-29 01:11:30 +0000
committerAlan Modra <amodra@gmail.com>2007-03-29 01:11:30 +0000
commit2ce859a18d876f2e7ff256ae9004c5380c7b44f3 (patch)
tree730bc0ab92c004daaa070e03bc73463e9e940a72
parent2482afc6aaf1692fbb1c9e7f75ba49dfe71bdc8c (diff)
downloadgdb-2ce859a18d876f2e7ff256ae9004c5380c7b44f3.zip
gdb-2ce859a18d876f2e7ff256ae9004c5380c7b44f3.tar.gz
gdb-2ce859a18d876f2e7ff256ae9004c5380c7b44f3.tar.bz2
PR ld/4267
* elf32-ppc.c (allocate_dynrelocs): Set plt.offset to -1 for unused entries. Don't clear plt.plist in loop.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-ppc.c14
2 files changed, 14 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e920c70..7d9e2d8 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-29 Alan Modra <amodra@bigpond.net.au>
+
+ 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 <richard@codesourcery.com>
* 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 2355687..d1cd431 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
{