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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to