public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Gold: Fix mips.cc for GCC 4.2
@ 2017-05-02  0:09 H.J. Lu
  2017-07-26 17:03 ` Cary Coutant
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2017-05-02  0:09 UTC (permalink / raw)
  To: binutils

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.

OK for master?

H.J.
--
	* mips.cc (Mips_relocate_functions): Add "llu" suffix to
	0x800080008000.
---
 gold/mips.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gold/mips.cc b/gold/mips.cc
index 4fc160b..5555562 100644
--- a/gold/mips.cc
+++ b/gold/mips.cc
@@ -5664,7 +5664,7 @@ class Mips_relocate_functions : public Relocate_functions<size, big_endian>
                                      : 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)
-- 
2.9.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Gold: Fix mips.cc for GCC 4.2
  2017-05-02  0:09 [PATCH] Gold: Fix mips.cc for GCC 4.2 H.J. Lu
@ 2017-07-26 17:03 ` Cary Coutant
  2017-07-26 17:53   ` H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Cary Coutant @ 2017-07-26 17:03 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Binutils

>         * mips.cc (Mips_relocate_functions): Add "llu" suffix to
>         0x800080008000.

This is OK for master and 2.28 and 2.29 branches. Sorry for the slow response!

-cary

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Gold: Fix mips.cc for GCC 4.2
  2017-07-26 17:03 ` Cary Coutant
@ 2017-07-26 17:53   ` H.J. Lu
  0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 2017-07-26 17:53 UTC (permalink / raw)
  To: Cary Coutant; +Cc: Binutils

On Wed, Jul 26, 2017 at 10:03 AM, Cary Coutant <ccoutant@gmail.com> wrote:
>>         * mips.cc (Mips_relocate_functions): Add "llu" suffix to
>>         0x800080008000.
>
> This is OK for master and 2.28 and 2.29 branches. Sorry for the slow response!
>

I checked it into master and 2.29 branches.  2.28 branch isn't affected.


-- 
H.J.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-26 17:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-02  0:09 [PATCH] Gold: Fix mips.cc for GCC 4.2 H.J. Lu
2017-07-26 17:03 ` Cary Coutant
2017-07-26 17:53   ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).