This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

weaken ___main definition in asm-names.c test (Was: gcc.dg/asm-names-1.c)


> 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(); }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]