mips: genmongoosev/start/start.S

Ralf Corsepius corsepiu at faw.uni-ulm.de
Wed Sep 10 02:46:33 UTC 2003


On Tue, 2003-09-09 at 17:26, gregory.menke at gsfc.nasa.gov wrote:
> Ralf Corsepius writes:
>  > On Tue, 2003-09-09 at 16:37, gregory.menke at gsfc.nasa.gov wrote:
>  > > Ralf Corsepius writes:
>  > >  > Hi,
>  > >  > 
>  > >  > May-be there's a mips-expert on this list, who can help:
>  > >  > 
>  > >  > Compiling genmongoosev/start/start.S with gcc-3.3.2pre and binutils-2.14
>  > >  > fails with this error:
>  > >  > 
>  > >  > # mips-rtems4.7-gcc --pipe -B../../../../../../../lib/
>  > >  > -B../../../../../../../genmongoosev/lib/ -specs bsp_specs -qrtems -mips1
>  > >  > -G0 -isystem ../../../../../../../genmongoosev/lib/include   -DASM -o
>  > >  > o-optimize/start.o -c
>  > >  > .../../../../../../../../../../rtems.master/c/src/lib/libbsp/mips/genmongoosev/start/start.S
>  > >  > .../../../../../../../../../../rtems.master/c/src/lib/libbsp/mips/genmongoosev/start/start.S: Assembler messages:
>  > >  > .../../../../../../../../../../rtems.master/c/src/lib/libbsp/mips/genmongoosev/start/start.S:585: Error: load/store address overflow (max 32 bits)
>  > >  > .../../../../../../../../../../rtems.master/c/src/lib/libbsp/mips/genmongoosev/start/start.S:620: Error: load/store address overflow (max 32 bits)
>  > >  > .../../../../../../../../../../rtems.master/c/src/lib/libbsp/mips/genmongoosev/start/start.S:628: Error: load/store address overflow (max 32 bits)
>  > >  > ....
>  > >  > 
>  > >  > AFAIS, all lines gas is complaining about are of this type:
>  > >  > 
>  > >  >    sw  t0,M_BIU
>  > >  > 
>  > >  > gcc-3.2.x/binutils-2.13.x compiled this file without any complaint.
>  > >  > So, what is it that cause gcc-3.3.x/binutils-2.14 to fail?
>  > >  > Invalid ASM, previous versions of the toolchain has let pass through? A
>  > >  > bug in gcc-3.3.x, binutils-2.14? Invalid compiler options not matching
>  > >  > the expectations of this *.S-file?
>  > >  > 
>  > > 
>  > > I haven't upgraded to gcc 3.3 yet, so I can't test directly.
>  > 
>  > Don't! It seems to be horribly broken. At least I just have encountered
>  > a breath-taking bug in gcc-3.3.2pre, which I verified to break at least
>  > mips-rtems and i386-rtems, and suspect to probably break all rtems-gccs,
>  > if not many more targets.
>  > 
>  > These "M_BIU" type of arguments are defines, aren't they?
>  > If so, the bug I just tripped over, could be an explanation.

My assumption was wrong. Meanwhile I can demonstrate that this issue is
not related to gcc-3.3, but to binutils-2.14:

When compiling start.S into a start.s (gcc --save-temps), either with
gcc-3.2.3 or gcc-3.3.2, both start.s files basically are identical, but
binutils-2.14 is not able to compile it.

Proof:
Compiling start.S with gcc-3.2.3:

# mips-rtems4.6-gcc --pipe -B../../../../../../../lib/ -B../../../../../../../genmongoosev/lib/ -specs bsp_specs -qrtems -mips1 -G0 -isystem ../../../../../../../genmongoosev/lib/include   -DASM -o o-optimize/start.o -c ../../../../../../../../../../rtems-4-6-branch/c/src/lib/libbsp/mips/genmongoosev/start/start.S -v --save-temps
...
/opt/rtems-4.6/lib/gcc-lib/mips-rtems4.6/3.2.3/../../../../mips-rtems4.6/bin/as -G0 -mips1 -v -o o-optimize/start.o start.s
GNU assembler version 2.13.2.1 (mips-rtems4.6) using BFD version 2.13.2.1

=> binutils-2.13.2.1 assembled start.s without complaint.

Now, assembling the start.s which has been produced during the gcc-3.2.3
call, using binutils-2.14:

# /opt/rtems-4.7/lib/gcc-lib/mips-rtems4.7/3.3.2/../../../../mips-rtems4.7/bin/as -G0 -mips1 -v -o o-optimize/start.o start.s
GNU assembler version 2.14 (mips-rtems4.7) using BFD version 2.14 20030612
../../../../../../../../../../rtems-4-6-branch/c/src/lib/libbsp/mips/genmongoosev/start/start.S: Assembler messages:
../../../../../../../../../../rtems-4-6-branch/c/src/lib/libbsp/mips/genmongoosev/start/start.S:585: Error: load/store address overflow (max 32
bits)
../../../../../../../../../../rtems-4-6-branch/c/src/lib/libbsp/mips/genmongoosev/start/start.S:620: Error: load/store address overflow (max 32
bits)
../../../../../../../../../../rtems-4-6-branch/c/src/lib/libbsp/mips/genmongoosev/start/start.S:628: Error: load/store address overflow (max 32
bits)

Note: start.s is the same file, start.s has been generated by gcc-3.2.3,
the call to as uses identical arguments.

=> It's not directly gcc-3.3's fault.

This indicates, that one or more points from this list below might
apply:
* Assembling start.s trips bugs in binutils-2.14. 
* binutils-2.14 catches bugs in start.S which binutils-2.13.2.1 had let
slip through.
* binutils-2.14 might require further/different options/arguments to
assemble start.S

Ralf





More information about the users mailing list