Failure of cross-assembling for ARC cpu target
Angel Manchado
manchado@iies.es
Sun May 20 11:17:00 GMT 2001
On Fri, May 18, 2001 at 01:22:17PM +0930, amodra@one.net.au wrote:
> On Thu, May 17, 2001 at 10:56:37PM +0200, A. Manchado wrote:
> > /tmp/cc4ga3g6.s:46: Error: junk at end of line: `ld blink,[fp,4]'
>
> Someone else will have to handle this one. Peter? I don't really
> know much about ARC.
>
> Alan Modra
>
One possible solution:
comparing gcc/config/arc/initfini.c between gcc-2.95.3 and the old egcs-1.0.2, I've seen that they differ in the trailing backslashes in the assembler function definitions.
So in order to check how that would work, I have applied the patch below to gcc-2.95.3/gcc/config/arc/initfini.c .
This time initfini.c has been compiled with no errors
(more errors appear at a later stage, but that's another story).
Since I don't know the ARC assembler nor the inners of GCC, perhaps someone more experienced could take a look at it.
Angel Manchado
*** /tmp/initfini.c Sun May 20 12:33:54 2001
--- /tmp/initfini.cIlAHCm Sun May 20 12:33:54 2001
***************
*** 77,106 ****
/* .init section start.
This must appear at the start of the .init section. */
! asm ("\n\
! .section .init\n\
! .global init\n\
! .word 0\n\
! init:\n\
! st blink,[sp,4]\n\
! st fp,[sp]\n\
! mov fp,sp\n\
! sub sp,sp,16\n\
");
/* .fini section start.
This must appear at the start of the .init section. */
! asm ("\n\
! .section .fini\n\
! .global fini\n\
! .word 0\n\
! fini:\n\
! st blink,[sp,4]\n\
! st fp,[sp]\n\
! mov fp,sp\n\
! sub sp,sp,16\n\
! bl.nd __do_global_dtors\n\
");
#endif /* CRT_INIT */
--- 77,106 ----
/* .init section start.
This must appear at the start of the .init section. */
! asm ("
! .section .init\n
! .global init\n
! .word 0\n
! init:\n
! st blink,[sp,4]\n
! st fp,[sp]\n
! mov fp,sp\n
! sub sp,sp,16\n
");
/* .fini section start.
This must appear at the start of the .init section. */
! asm ("
! .section .fini\n
! .global fini\n
! .word 0\n
! fini:\n
! st blink,[sp,4]\n
! st fp,[sp]\n
! mov fp,sp\n
! sub sp,sp,16\n
! bl.nd __do_global_dtors
");
#endif /* CRT_INIT */
***************
*** 136,157 ****
/* .init section end.
This must live at the end of the .init section. */
! asm ("\n\
! .section .init\n\
! bl.nd __do_global_ctors\
! ld blink,[fp,4]\n\
! j.d blink\n\
! ld.a fp,[sp,16]\n\
");
/* .fini section end.
This must live at the end of the .fini section. */
! asm ("\n\
! .section .fini\n\
! ld blink,[fp,4]\n\
! j.d blink\n\
! ld.a fp,[sp,16]\n\
");
#endif /* CRT_FINI */
--- 136,157 ----
/* .init section end.
This must live at the end of the .init section. */
! asm ("
! .section .init\n
! bl.nd __do_global_ctors
! ld blink,[fp,4]\n
! j.d blink\n
! ld.a fp,[sp,16]\n
");
/* .fini section end.
This must live at the end of the .fini section. */
! asm ("
! .section .fini\n
! ld blink,[fp,4]\n
! j.d blink\n
! ld.a fp,[sp,16]\n
");
#endif /* CRT_FINI */
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list