[LLVMbugs] [Bug 660] NEW: [llvm-gcc] Add support for __attribute__((used))
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Nov 11 23:36:55 PST 2005
http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=660
Summary: [llvm-gcc] Add support for __attribute__((used))
Product: tools
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P2
Component: llvm-gcc
AssignedTo: unassignedbugs at nondot.org
ReportedBy: sabre at nondot.org
CC: markus at oberhumer.com
llvm-gcc should add support for attribute used. It should do this in the following way:
1. If any globals/functions are marked with attribute((used)), the CFE should create a new appending
global array "llvm.used", which has external linkage and is just an array of pointers to all of the globals
that are 'used' (similar to the way that the %llvm.global_ctors list is emitted).
2. The internalize pass should not mark llvm.used internal under any circumstance.
3. The linker will already automatically concatenate these lists.
This will add new functionality (implementing a missing gcc feature), and it will also give Markus an
elegant solution to the problem outlined in Bug 651. Because the llvm.used array will have pointers to
these, and because the array is external, the optimizer will never mess with these variables, even when
using internalize.
-Chris
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list