diff --git a/gold/ChangeLog b/gold/ChangeLog index f67df17b5b..457fa6b87b 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,7 @@ +2014-12-22 Cary Coutant + + * powerpc.cc (Target_powerpc::relocate): Fix overflow check. + 2014-12-20 H.J. Lu PR gold/14608 diff --git a/gold/powerpc.cc b/gold/powerpc.cc index 1407a0e873..e456c85228 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -7531,7 +7531,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 @@ -7542,6 +7541,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