linux-mips
[Top] [All Lists]

Re: load/store address overflow on binutils 2.14

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: load/store address overflow on binutils 2.14
From: Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>
Date: Fri, 8 Aug 2003 05:07:05 +0200
Cc: linux-mips@linux-mips.org
In-reply-to: <20030808.101102.71082885.nemoto@toshiba-tops.co.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20030807.190330.26271096.nemoto@toshiba-tops.co.jp> <20030807231518.GH3759@rembrandt.csv.ica.uni-stuttgart.de> <20030808.101102.71082885.nemoto@toshiba-tops.co.jp>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.4i
Atsushi Nemoto wrote:
> >>>>> On Fri, 8 Aug 2003 01:15:18 +0200, Thiemo Seufer 
> >>>>> <ica2_ts@csv.ica.uni-stuttgart.de> said:
> Thiemo> It shouldn't trigger for 32bit, because 0x80000000 is a
> Thiemo> sign-extended 32bit number. How is mips-linux-as actually
> Thiemo> invoked?
> 
> Like this (using mipsel):
> 
> $ mipsel-linux-gcc -o b.o -c -v b.S
> Reading specs from /usr/lib/gcc-lib/mipsel-linux/3.3/specs
> Configured with: ../gcc-3.3/configure --target=mipsel-linux --prefix=/usr 
> --disable-nls --enable-languages=c --disable-shared --disable-threads
> Thread model: single
> gcc version 3.3
>  /usr/lib/gcc-lib/mipsel-linux/3.3/cc1 -E -lang-asm -quiet -v -D__GNUC__=3 
> -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 b.S -o /tmp/cceVg6Jo.s
> ignoring nonexistent directory "/usr/mipsel-linux/sys-include"
> ignoring nonexistent directory "/usr/mipsel-linux/include"
> #include "..." search starts here:
> #include <...> search starts here:
>  /usr/lib/gcc-lib/mipsel-linux/3.3/include
> End of search list.
>  /usr/lib/gcc-lib/mipsel-linux/3.3/../../../../mipsel-linux/bin/as -EL -g0 
> -32 -v -KPIC -o b.o /tmp/cceVg6Jo.s
> GNU assembler version 2.14 (mipsel-linux) using BFD version 2.14 20030612
> b.S: Assembler messages:
> b.S:1: Error: load/store address overflow (max 32 bits)
> 
> The b.S is just one line "lw $2, 0x80000000".

Using  0xffffffff80000000 is a really ugly workaround for it.
Seems like the constant isn't properly sign-extended inernally
by the assembler.


Thiemo

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