This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: mips-elf/rtems and binutils 2.13.1pre1
Am Mit, 2002-11-06 um 22.28 schrieb Ralf Corsepius:
> Am Mit, 2002-11-06 um 21.05 schrieb Daniel Jacobowitz:
> > On Wed, Nov 06, 2002 at 01:54:47PM -0600, Joel Sherrill wrote:
> > >
> > > I am trying to compile all the RTEMS source for all targets using
> > > binutils 2.13.1 pre1 and got this new error:
> > >
> > > mips-rtems-gcc --pipe -isystem ../../../../../p4600/lib/include
> > > -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC
> > > -DBOOTP_COMPAT -O4 -fomit-frame-pointer -g -Wall -mips3 -G0 -o
> > > o-optimize/in_pcb.o -c
> > > ../../../../../../../current/c/src/../../cpukit/libnetworking/netinet/in_pcb.c
> > > {standard input}: Assembler messages:
> > > {standard input}:1884: Error: illegal operands `sd 0,112($sp)'
I am able to reproduce the bug with the code fragment below (reduced
from the original code which produced the error above):
# cat in_pcb.c
struct in_addr {
unsigned long s_addr __attribute__((packed)) ;
};
void
in_pcbnotify( struct in_addr laddr )
{
laddr.s_addr = 0;
}
With binutils-2.13/gcc-3.2, the error occurs if compiling this fragment
for mips-rtems with -O >= 1 and -mips3
# mips-rtems-gcc -O1 -mips3 -o o-optimize/in_pcb.o in_pcb.c
/tmp/ccfoPmP7.s: Assembler messages:
/tmp/ccfoPmP7.s:13: Error: illegal operands `sd 0,0($sp)'
The error does not occur if not using -mips3 or using -O0, or if having
removed the __attribute__((packed)) from of the code fragment above.
Ralf