From: H.J. Lu Date: Wed, 26 Jul 2017 17:39:20 +0000 (-0700) Subject: Gold: Fix mips.cc for GCC 4.2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=104f0515d038716599728f8e2b58aefe3fc188aa;p=binutils-gdb.git Gold: Fix mips.cc for GCC 4.2 GCC 4.2 fails to compile "(uint64_t) 0x800080008000" with error: integer constant is too large for ‘long’ type This patch adds "llu" suffix to 0x800080008000 for GCC 4.2. * mips.cc (Mips_relocate_functions): Add "llu" suffix to 0x800080008000. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 01f0d34d1c7..502af851c55 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2017-07-26 H.J. Lu + + * mips.cc (Mips_relocate_functions): Add "llu" suffix to + 0x800080008000. + 2017-07-23 Alan Modra * powerpc.cc (glink_eh_frame_fde_64v2): Correct advance to diff --git a/gold/mips.cc b/gold/mips.cc index 4fc160bbe9b..55555625709 100644 --- a/gold/mips.cc +++ b/gold/mips.cc @@ -5664,7 +5664,7 @@ class Mips_relocate_functions : public Relocate_functions : addend_a); Valtype x = psymval->value(object, addend); - x = ((x + (uint64_t) 0x800080008000) >> 48) & 0xffff; + x = ((x + (uint64_t) 0x800080008000llu) >> 48) & 0xffff; val = Bits<32>::bit_select32(val, x, 0xffff); if (calculate_only)