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)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 13 Jan 2017 15:47:52 +0000 (07:47 -0800)
PR gold/21040
* powerpc.cc (Powerpc_relobj<size, big_endian>::make_toc_relative):
Cast 0x80008000 to uint64_t.

gold/ChangeLog
gold/powerpc.cc

index 991d7b8b8c8780f12041d2603be486f16374d039..787fb6e7e76077a567a6bc7b4c0e7fcc1d4fb324 100644 (file)
@@ -1,3 +1,9 @@
+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-12  Cary Coutant  <ccoutant@gmail.com>
 
        * object.cc (Sized_relobj_file): Fix byte counts for calls to memmem.
index 3e4e08bcc8b38c99a324abc4c05f7c5c748892a0..a67c33618bd5a28548213a9b3c2f459fe061960a 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;
This page took 0.028316 seconds and 4 git commands to generate.