This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
weaken ___main definition in asm-names.c test (Was: gcc.dg/asm-names-1.c)
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Cc: Richard Henderson <rth at redhat dot com>
- Date: Thu, 15 May 2003 19:34:01 +0100
- Subject: weaken ___main definition in asm-names.c test (Was: gcc.dg/asm-names-1.c)
- Organization: SuperH UK Ltd.
> This patch adds a dummy ___main to appease the linker, and it fixes the
> failure on mips.
The definition of ___main (assembler name) conflicts with
the one in sh-elf/gcc/crt1.o .
--
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658
2003-05-15 J"orn Rennecke <joern.rennecke@superh.com>
* gcc.dg/asm-names.c (ymain): Make it weak.
Index: asm-names.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/testsuite/gcc.dg/asm-names.c,v
retrieving revision 1.2
diff -p -r1.2 asm-names.c
*** asm-names.c 27 Aug 2001 19:23:11 -0000 1.2
--- asm-names.c 15 May 2003 18:24:45 -0000
*************** extern int xmain (void) asm ("main");
*** 23,27 ****
--- 23,29 ----
int xmain (void) { return main(); }
/* In case built where the runtime calls __main. */
+ /* But make it weak because some targets already define this function. */
+ #pragma weak ymain
extern int ymain (void) asm ("___main");
int ymain (void) { return main(); }