This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/binutils-2_30-branch] Warning fix


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a6e9be3e03c09e76c0af203a16f431aba22ddeaa

commit a6e9be3e03c09e76c0af203a16f431aba22ddeaa
Author: Alan Modra <amodra@gmail.com>
Date:   Wed Jan 17 21:24:32 2018 +1030

    Warning fix
    
    	* elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
    
    (cherry picked from commit c75bc4f76fe456c57ef1e446db5378182692c429)

Diff:
---
 bfd/ChangeLog   | 4 ++++
 bfd/elf64-ppc.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 296484a..979db89 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,9 @@
 2018-01-18  Alan Modra  <amodra@gmail.com>
 
+	* elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
+
+2018-01-18  Alan Modra  <amodra@gmail.com>
+
 	* elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
 	__tls_get_addr_opt, and alignment sizing.
 	(TLS_GET_ADDR_GLINK_SIZE): Delete.
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 10d3fe9..8806436 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -13171,7 +13171,7 @@ ppc64_elf_build_stubs (struct bfd_link_info *info,
 	}
       bfd_put_32 (htab->glink->owner, BCTR, p);
       p += 4;
-      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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]