[LLVMbugs] [Bug 9589] New: [with patch] weak/linkonce linkage broken in execution engine
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 30 04:07:12 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=9589
Summary: [with patch] weak/linkonce linkage broken in execution
engine
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Target-Independent JIT
AssignedTo: unassignedbugs at nondot.org
ReportedBy: Matthieu.Moy at imag.fr
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=6379)
--> (http://llvm.org/bugs/attachment.cgi?id=6379)
Testcase to reproduce the problem
The function getOrEmitGlobalVariable() is looking for native symbols
only for external symbols. In the case of weak and linkonce symbols in
the bitcode, not looking for a native symbol is leading to
duplication of the symbol.
In the case when a symbol (like a C++ vtable) is defined in a plugin,
and used in a bitcode file, we do want the symbol to be unique.
Otherwise, for example, a call to dynamic_cast within a plugin to cast
an object instanciated from the JIT-ed code fails unexpectedly.
Attached are two patches to fix the issue: the first adds a (failing) testcase,
and the second fixes the issue in LLVM. Patches produced with Git with commit
message included.
--
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