[llvm-bugs] [Bug 28611] New: pragma weak doesn't work if has more than 1 alias
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jul 18 23:49:23 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28611
Bug ID: 28611
Summary: pragma weak doesn't work if has more than 1 alias
Product: clang
Version: 3.9
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: qshanz at cn.ibm.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
> cat a.c
#pragma weak a = bad
#pragma weak b = bad
#pragma weak c = bad
void bad(int *info ) { *info = 0 ; }
> clang a.c -c
> readelf -sW a.o
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 FILE LOCAL DEFAULT ABS a.c
2: 0000000000000000 32 FUNC WEAK DEFAULT 2 a
3: 0000000000000000 32 FUNC GLOBAL DEFAULT 2 bad
Note that, the symbol b and c are missing.
This is gcc behavior:
8: 0000000000000000 52 FUNC GLOBAL DEFAULT 1 bad
9: 0000000000000000 52 FUNC WEAK DEFAULT 1 a
10: 0000000000000000 52 FUNC WEAK DEFAULT 1 b
11: 0000000000000000 52 FUNC WEAK DEFAULT 1 c
> clang -v
clang version 3.9.0 (trunk 264998) (llvm/trunk 264997)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160719/a4006847/attachment.html>
More information about the llvm-bugs
mailing list