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: [email protected]
Reporter: [email protected]
CC: [email protected]
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.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs