[LLVMbugs] [Bug 3004] New: weak symbol is not weak

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Nov 2 06:35:48 PST 2008


http://llvm.org/bugs/show_bug.cgi?id=3004

           Summary: weak symbol is not weak
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu


attribute(weak) doesn't turn the symbol into a weak symbol with llvm-gcc.

$ gcc foo.c -c -o foo.o
$ nm foo.o
0000000000000000 W init_IRQ
0000000000000000 T native_init_IRQ

^Correct

$ llvm-gcc foo.c -c -o foo.o
$ nm foo.o
0000000000000000 d EH_frame0
0000000000000000 T init_IRQ
0000000000000000 T native_init_IRQ
0000000000000018 d native_init_IRQ.eh
^Incorrect

/* testcase */

void init_IRQ(void) __attribute__((weak, alias("native_init_IRQ")));
void native_init_IRQ(void) {}


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list