]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Gold: Fix build with GCC 4.2
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 13 Jan 2017 15:46:14 +0000 (07:46 -0800)
committerAlan Modra <amodra@gmail.com>
Tue, 21 Feb 2017 23:10:24 +0000 (09:40 +1030)
PR gold/21040
* powerpc.cc (Powerpc_relobj<size, big_endian>::make_toc_relative):
Cast 0x80008000 to uint64_t.

gold/ChangeLog
gold/powerpc.cc

index b9f3c5031fa05dc6e982bfffcb7f0fd7f0763217..0aeff82535f61707dc05b96ed73ca6d58867be7f 100644 (file)
@@ -1,6 +1,11 @@
 2017-02-22  Alan Modra  <amodra@gmail.com>
 
        Apply from master
+       2017-01-13  H.J. Lu  <hongjiu.lu@intel.com>
+       PR gold/21040
+       * powerpc.cc (Powerpc_relobj<size, big_endian>::make_toc_relative):
+       Cast 0x80008000 to uint64_t.
+
        2017-01-11  Alan Modra  <amodra@gmail.com>
        * powerpc.cc (class Powerpc_copy_relocs): New.
        (Powerpc_copy_relocs::emit): New function.
index 7ff03ea9044ae649a63efacb4fe970c33debe241..fec18cdbb9d7af1e406cfd937f285fef7d51553e 100644 (file)
@@ -2010,7 +2010,7 @@ Powerpc_relobj<size, big_endian>::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;