[LLVMbugs] [Bug 3709] Clang miscompiles crtend.
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Mar 4 10:40:19 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=3709
Chris Lattner <clattner at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #7 from Chris Lattner <clattner at apple.com> 2009-03-04 12:40:19 ---
The problem here is that __CTOR_END__ has magic semantics that the compiler
doesn't know about, and is marked static. The proper way to tell the compiler
"don't touch" is to use __attribute__((used)), and doing so fixes the problem.
Please use something like this:
static func_ptr __attribute__((used)) __CTOR_END__[1]
__attribute__((section(".ctors"), aligned(sizeof(func_ptr)))) = { (func_ptr) 0
};
-Chris
--
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