aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2009-06-22 00:00:32 +0000
committerAlan Modra <amodra@gmail.com>2009-06-22 00:00:32 +0000
commit983bddc8525cca872c7a33492c1003e2ab744631 (patch)
tree8da8666961817f40663102bcaba55421d2a0e449
parent0e25c6124f2e8517b9bc31c8a5f09f4f871d4463 (diff)
downloadgdb-983bddc8525cca872c7a33492c1003e2ab744631.zip
gdb-983bddc8525cca872c7a33492c1003e2ab744631.tar.gz
gdb-983bddc8525cca872c7a33492c1003e2ab744631.tar.bz2
* elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elf64-ppc.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f01de47..52f3ca5 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2009-06-22 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
+
2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
* elflink.c (elf_link_add_object_symbols): Avoid warning
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 04f21ee..c3b2115 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -6721,11 +6721,12 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info,
{
Elf_Internal_Rela *write_rel;
bfd_byte *rptr, *wptr;
- bfd_byte *new_contents = NULL;
+ bfd_byte *new_contents;
bfd_boolean skip;
long opd_ent_size;
bfd_size_type amt;
+ new_contents = NULL;
amt = sec->size * sizeof (long) / 8;
opd = &ppc64_elf_section_data (sec)->u.opd;
opd->adjust = bfd_zalloc (obfd, amt);