Gold: Fix build with GCC 4.2

PR gold/21040
	* powerpc.cc (Powerpc_relobj<size, big_endian>::make_toc_relative):
	Cast 0x80008000 to uint64_t.
This commit is contained in:
H.J. Lu 2017-01-13 07:46:14 -08:00
parent 6f8976bfd6
commit 857e829e3a
2 changed files with 7 additions and 1 deletions

View 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.

View 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;