[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [openrisc] or32 gcc bug



Hello Matan,

Yes, I have found this mistake recently, but I forgot to commit the fix
for this bug.
I put new version of or1k/gcc/gcc/config/or32/or32.h on CVS. This should
solve the problem.

Regards,
Simon

Matan Ziv-Av wrote:
> 
> The following program cannot be linked correctly (using the binutils and
> gcc from open cores cvs, 02/07/2001).
> 
> int main() {
> 
> char *fmt;
> int base;
>                 switch (*fmt) {
>                 case 's':
>                 case 'p':
> 
>                 case 'n':
>                         break;
> 
>                 case '%':
>                         break;
> 
>                 case 'o':
>                         base = 8;
>                         break;
>                 case 'd':
>                         break;
>                 case 'i':
>                         break;
>                 case 'u':
>                         break;
>                 }
> }
> 
> The compile command is: (libc.o is needed for __main).
> 
> 17:02:57:~/c/openrisc/emu$ or32-coff-gcc -nostdlib -o switchtest \
> switchtest.c libc.o
> /tmp/ccCfa3Hu.o(.text+0x5c):switchtest.c: undefined reference to `L7'
> /tmp/ccCfa3Hu.o(.text+0x60):switchtest.c: undefined reference to `L3'
> /tmp/ccCfa3Hu.o(.text+0x64):switchtest.c: undefined reference to `L3'
> /tmp/ccCfa3Hu.o(.text+0x68):switchtest.c: undefined reference to `L3'
> /tmp/ccCfa3Hu.o(.text+0x6c):switchtest.c: undefined reference to `L3'
> /tmp/ccCfa3Hu.o(.text+0x70):switchtest.c: undefined reference to `L3'
> /tmp/ccCfa3Hu.o(.text+0x74):switchtest.c: more undefined references to
> `L3' follow
> /tmp/ccCfa3Hu.o(.text+0x158):switchtest.c: undefined reference to `L9'
> /tmp/ccCfa3Hu.o(.text+0x15c):switchtest.c: undefined reference to `L3'
> /tmp/ccCfa3Hu.o(.text+0x160):switchtest.c: undefined reference to `L3'
> /tmp/ccCfa3Hu.o(.text+0x164):switchtest.c: undefined reference to `L3'
> /tmp/ccCfa3Hu.o(.text+0x168):switchtest.c: undefined reference to `L3'
> /tmp/ccCfa3Hu.o(.text+0x16c):switchtest.c: undefined reference to `L10'
> /tmp/ccCfa3Hu.o(.text+0x170):switchtest.c: undefined reference to `L3'
> /tmp/ccCfa3Hu.o(.text+0x174):switchtest.c: undefined reference to `L3'
> /tmp/ccCfa3Hu.o(.text+0x178):switchtest.c: undefined reference to `L3'
> /tmp/ccCfa3Hu.o(.text+0x17c):switchtest.c: undefined reference to `L3'
> /tmp/ccCfa3Hu.o(.text+0x180):switchtest.c: undefined reference to `L6'
> /tmp/ccCfa3Hu.o(.text+0x184):switchtest.c: undefined reference to `L8'
> /tmp/ccCfa3Hu.o(.text+0x188):switchtest.c: undefined reference to `L6'
> /tmp/ccCfa3Hu.o(.text+0x18c):switchtest.c: undefined reference to `L3'
> /tmp/ccCfa3Hu.o(.text+0x190):switchtest.c: undefined reference to `L3'
> /tmp/ccCfa3Hu.o(.text+0x194):switchtest.c: undefined reference to `L6'
> /tmp/ccCfa3Hu.o(.text+0x198):switchtest.c: undefined reference to `L3'
> /tmp/ccCfa3Hu.o(.text+0x19c):switchtest.c: undefined reference to `L11'
> collect2: ld returned 1 exit status
> 
> It seems that the problem is in gcc and not ld, since compiling with old
> gcc and current ld, works, while current gcc and older ld gives the same
> problem.
> 
> --
> Matan Ziv-Av.                         matan@svgalib.org
> 
> --
> To unsubscribe from openrisc mailing list please visit http://www.opencores.org/mailinglists.shtml
--
To unsubscribe from openrisc mailing list please visit http://www.opencores.org/mailinglists.shtml