diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-01-13 07:46:14 -0800 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-02-22 09:40:24 +1030 |
commit | c8dbc58e0a9be82937b5875fe53412e260a6cc42 (patch) | |
tree | 6e6d386b842c246d1841ce58dd196a5212ae6807 | |
parent | 931ad3dd3a2092c691e1c1a3378fa9060850ae52 (diff) | |
download | gdb-c8dbc58e0a9be82937b5875fe53412e260a6cc42.zip gdb-c8dbc58e0a9be82937b5875fe53412e260a6cc42.tar.gz gdb-c8dbc58e0a9be82937b5875fe53412e260a6cc42.tar.bz2 |
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.
-rw-r--r-- | gold/ChangeLog | 5 | ||||
-rw-r--r-- | gold/powerpc.cc | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index b9f3c50..0aeff82 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -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. diff --git a/gold/powerpc.cc b/gold/powerpc.cc index 7ff03ea..fec18cd 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -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; |