[Bug middle-end/37280] [4.4 Regression] weak symbol regression breaks linux kernel
chaoyingfu at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Sep 16 01:13:00 GMT 2008
------- Comment #8 from chaoyingfu at gcc dot gnu dot org 2008-09-16 01:11 -------
Hi,
For MIPS targets (mipsisa32r2-sde-elf), ".weak" is still not emitted.
Thanks!
Ex:
# cat 152.c
extern int arr[] __attribute__((weak));
int test(int i)
{
return arr[i];
}
# ~/dev/binutils3/build-all2/gcc/cc1 -quiet 152.c -o 152.s -O2
# cat 152.s
.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
.ident "GCC: (GNU) 4.4.0 20080915 (experimental) [trunk revision
131984]"
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37280
More information about the Gcc-bugs
mailing list