From: H.J. Lu Date: Fri, 13 Jan 2017 15:46:14 +0000 (-0800) Subject: Gold: Fix build with GCC 4.2 X-Git-Tag: users/ARM/embedded-binutils-2_28-branch-2017q1~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=964f1b32b950a906dbd24ee8805d810c07962153;p=thirdparty%2Fbinutils-gdb.git Gold: Fix build with GCC 4.2 PR gold/21040 * powerpc.cc (Powerpc_relobj::make_toc_relative): Cast 0x80008000 to uint64_t. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 991d7b8b8c8..787fb6e7e76 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2017-01-13 H.J. Lu + + PR gold/21040 + * powerpc.cc (Powerpc_relobj::make_toc_relative): + Cast 0x80008000 to uint64_t. + 2017-01-12 Cary Coutant * object.cc (Sized_relobj_file): Fix byte counts for calls to memmem. diff --git a/gold/powerpc.cc b/gold/powerpc.cc index 3e4e08bcc8b..a67c33618bd 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -2010,7 +2010,7 @@ Powerpc_relobj::make_toc_relative( Address got_base = (target->got_section()->output_section()->address() + this->toc_base_offset()); addr -= got_base; - if (addr + 0x80008000 >= (uint64_t) 1 << 32) + if (addr + (uint64_t) 0x80008000 >= (uint64_t) 1 << 32) return false; *value = addr;