From: Cary Coutant Date: Mon, 22 Dec 2014 18:13:37 +0000 (-0800) Subject: [GOLD] Fix powerpc overflow check X-Git-Tag: binutils-2_25_1~241 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f22bd9263033734769acabb2013008fcea0413e7;p=thirdparty%2Fbinutils-gdb.git [GOLD] Fix powerpc overflow check * powerpc.cc (Target_powerpc::relocate): Fix overflow check. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index f10d114c90c..5acec31ffa5 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2015-02-11 Alan Modra + + Apply from master + 2014-12-22 Cary Coutant + * powerpc.cc (Target_powerpc::relocate): Fix overflow check. + 2015-01-06 H.J. Lu Cary Coutant diff --git a/gold/powerpc.cc b/gold/powerpc.cc index 0450937f246..d093c9df898 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -7452,7 +7452,6 @@ Target_powerpc::Relocate::relocate( Insn* iview = reinterpret_cast(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::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::Status status