This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/37280] [4.4 Regression] weak symbol regression breaks linux kernel
- From: "chaoyingfu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Sep 2008 01:11:50 -0000
- Subject: [Bug middle-end/37280] [4.4 Regression] weak symbol regression breaks linux kernel
- References: <bug-37280-7834@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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