diff mbox

Oh dear. I regret to inform you that commit 9e390558cef76767a98123994c422d0642d86cf8 might be unfortunate

Message ID 20180117105626.GY20622@bubble.grove.modra.org
State New
Headers show

Commit Message

Alan Modra Jan. 17, 2018, 10:56 a.m. UTC
On Wed, Jan 17, 2018 at 03:29:33AM -0500, gdb-buildbot@sergiodj.net wrote:
> My lords, ladies, gentlemen, members of the public.
> 
> It is a matter of great regret and sadness to inform you that commit:
> 
> 	PowerPC PLT stub tidy
> 	9e390558cef76767a98123994c422d0642d86cf8
> 
> might have made GDB unwell.

Hmm, not seen with my gcc-7 but this ought to cure the warning.

	* elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
diff mbox

Patch

diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 1b4404c..65cf7fe 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -13211,7 +13211,7 @@  ppc64_elf_build_stubs (struct bfd_link_info *info,
 	  p += 4;
 	}
       p = output_bctr (htab, htab->glink->owner, p);
-      BFD_ASSERT (p - htab->glink->contents == GLINK_PLTRESOLVE_SIZE (htab));
+      BFD_ASSERT (p == htab->glink->contents + GLINK_PLTRESOLVE_SIZE (htab));
 
       /* Build the .glink lazy link call stubs.  */
       indx = 0;