]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[GOLD] Fix powerpc overflow check
authorCary Coutant <ccoutant@google.com>
Mon, 22 Dec 2014 18:13:37 +0000 (10:13 -0800)
committerAlan Modra <amodra@gmail.com>
Wed, 11 Feb 2015 12:36:39 +0000 (23:06 +1030)
* powerpc.cc (Target_powerpc::relocate): Fix overflow check.

gold/ChangeLog
gold/powerpc.cc

index f10d114c90c6b09fb3c57cab25c69020ed67791b..5acec31ffa5468b92281866429e93967b404d61c 100644 (file)
@@ -1,3 +1,9 @@
+2015-02-11  Alan Modra  <amodra@gmail.com>
+
+       Apply from master
+       2014-12-22  Cary Coutant  <ccoutant@google.com>
+       * powerpc.cc (Target_powerpc::relocate): Fix overflow check.
+
 2015-01-06  H.J. Lu  <hongjiu.lu@intel.com>
            Cary Coutant  <ccoutant@google.com>
 
index 0450937f2469d57cde9cea4b3bef19aeb0ee81c9..d093c9df8984c9914afe684f4bfce89935dd6624 100644 (file)
@@ -7452,7 +7452,6 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
       Insn* iview = reinterpret_cast<Insn*>(view - 2 * big_endian);
       Insn insn = elfcpp::Swap<32, big_endian>::readval(iview);
 
-      overflow = Reloc::CHECK_SIGNED;
       if ((insn & (0x3f << 26)) == 10u << 26 /* cmpli */)
        overflow = Reloc::CHECK_BITFIELD;
       else if (overflow == Reloc::CHECK_LOW_INSN
@@ -7463,6 +7462,8 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
                  || (insn & (0x3f << 26)) == 25u << 26 /* oris */
                  || (insn & (0x3f << 26)) == 27u << 26 /* xoris */))
        overflow = Reloc::CHECK_UNSIGNED;
+      else
+       overflow = Reloc::CHECK_SIGNED;
     }
 
   typename Powerpc_relocate_functions<size, big_endian>::Status status