[Top] [All Lists]

Re: load/store address overflow on binutils 2.14

To: Atsushi Nemoto <>
Subject: Re: load/store address overflow on binutils 2.14
From: Thiemo Seufer <>
Date: Sun, 10 Aug 2003 14:08:44 +0200
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <>
User-agent: Mutt/1.5.4i
Atsushi Nemoto wrote:
> >>>>> On Fri, 8 Aug 2003 05:07:05 +0200, Thiemo Seufer 
> >>>>> <> said:
> >> The b.S is just one line "lw $2, 0x80000000".
> Thiemo> Using 0xffffffff80000000 is a really ugly workaround for it.
> Thiemo> Seems like the constant isn't properly sign-extended inernally
> Thiemo> by the assembler.
> Yes the workaround works.  But I modified binutils (just remove the
> checking code) instead of changing many constant definitions in my
> programs.  For now it is enough for me.  Thank you.

It is probably not a real binutils bug, but related to gcc mishandling
'unsigned long long'. The simple testcase

int main(void)
        unsigned long long a = 0;

        printf("%016x\n", ~a);

        return 0;



on my i386-linux system. On mips-linux it's even worse, the result is


If this is really an arch-independent problem, any (cross-)compile on
a 32bit system for 64bit BFD can be broken.


<Prev in Thread] Current Thread [Next in Thread>