From 4bfd1cd11cd784965b8565c5ececa7e41cfbcf18 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 9 Oct 2013 18:03:17 +0000 Subject: bfd/ * xcofflink.c (_bfd_xcoff_bfd_final_link): Don't touch EREL in loop that doesn't use (or initialize) it. --- bfd/ChangeLog | 5 +++++ bfd/xcofflink.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c1387746e89..9401cd4830b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2013-10-09 Roland McGrath + + * xcofflink.c (_bfd_xcoff_bfd_final_link): Don't touch EREL in + loop that doesn't use (or initialize) it. + 2013-10-09 Roland McGrath * elfxx-tilegx.c (tilegx32_plt_tail_entry, tilegx32_plt_tail_entry): diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c index e769e035359..d0bfd297391 100644 --- a/bfd/xcofflink.c +++ b/bfd/xcofflink.c @@ -1,6 +1,6 @@ /* POWER/PowerPC XCOFF linker support. Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Free Software Foundation, Inc. Written by Ian Lance Taylor , Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -6261,7 +6261,7 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) irel = flinfo.section_info[o->target_index].relocs; irelend = irel + o->reloc_count; rel_hash = flinfo.section_info[o->target_index].rel_hashes; - for (; irel < irelend; irel++, rel_hash++, erel += relsz) + for (; irel < irelend; irel++, rel_hash++) { if (*rel_hash != NULL) { -- cgit v1.2.1