[LLVMbugs] [Bug 12356] New: junk appended to extern aliased variable name

1 view
Skip to first unread message

bugzill...@llvm.org

unread,
Mar 26, 2012, 7:53:24 AM3/26/12
to llvm...@cs.uiuc.edu
http://llvm.org/bugs/show_bug.cgi?id=12356

Bug #: 12356
Summary: junk appended to extern aliased variable name
Product: clang
Version: trunk
Platform: PC
OS/Version: OpenBSD
Status: NEW
Severity: release blocker
Priority: P
Component: Static Analyzer
AssignedTo: krem...@apple.com
ReportedBy: ma...@peereboom.us
CC: llvm...@cs.uiuc.edu
Classification: Unclassified


Created attachment 8268
--> http://llvm.org/bugs/attachment.cgi?id=8268
Example code

When compiling the following code:

long __guard[8] = {0, 0, 0, 0, 0, 0, 0, 0};
extern long __stack_chk_guard[8] __attribute__((alias("__guard")));

The __stack_chk_guard alias has an Undefined __stack_chk_guard3 symbol added to
the .o

nm output:
$ nm libtest.so | grep stack_chk_guard
00401220 B __stack_chk_guard
U __stack_chk_guard3
$ clang -v
clang version 3.1
Target: amd64-unknown-openbsd5.1
Thread model: posix

This works correctly with clang 3.0 and gcc 4.6
$ nm libtest.so | grep stack_chk_guard
004012e0 B __stack_chk_guard
$ clang -v
clang version 3.0 (tags/RELEASE_30/final)
Target: amd64-unknown-openbsd5.1
Thread model: posix


See the attached tgz for the example code.

--
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.
_______________________________________________
LLVMbugs mailing list
LLVM...@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply all
Reply to author
Forward
0 new messages