From: H.J. Lu Date: Fri, 13 Jan 2017 15:46:14 +0000 (-0800) Subject: Gold: Fix build with GCC 4.2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c8dbc58e0a9be82937b5875fe53412e260a6cc42;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 b9f3c5031fa..0aeff82535f 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,6 +1,11 @@ 2017-02-22 Alan Modra Apply from master + 2017-01-13 H.J. Lu + PR gold/21040 + * powerpc.cc (Powerpc_relobj::make_toc_relative): + Cast 0x80008000 to uint64_t. + 2017-01-11 Alan Modra * powerpc.cc (class Powerpc_copy_relocs): New. (Powerpc_copy_relocs::emit): New function. diff --git a/gold/powerpc.cc b/gold/powerpc.cc index 7ff03ea9044..fec18cdbb9d 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;