------- Comment #9 from chaoyingfu at gcc dot gnu dot org 2008-09-16 18:54 ------- Hi,
I tried the following patch. http://gcc.gnu.org/ml/gcc-patches/2008-09/msg00195.html ".weak symbol" can be emitted, but with two same lines. Thanks! Ex: .file 1 "152.c" .section .mdebug.abi32 .previous .gnu_attribute 4, 1 .text .align 2 .globl test .set nomips16 .ent test .type test, @function test: .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0 .mask 0x00000000,0 .fmask 0x00000000,0 .set noreorder .set nomacro lui $2,%hi(arr) addiu $2,$2,%lo(arr) sll $4,$4,2 addu $4,$4,$2 j $31 lw $2,0($4) .set macro .set reorder .end test .size test, .-test .weak arr .weak arr .ident "GCC: (GNU) 4.4.0 20080915 (experimental) [trunk revision 131984 ]" -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37280