[LLVMdev] [PATCH] Fix weak/linkonce linkage in execution engine

Matthieu Moy Matthieu.Moy at grenoble-inp.fr
Tue Mar 15 11:39:44 PDT 2011


Hi,

I've had problem with a program using LLVM that tried to dynamic_cast
objects created in the JIT execution engine, from the native part of the
program (for the curious, the program is PinaVM
http://gitorious.org/pinavm/pages/Home).

I've narrowed down the issue to the linkage of weak_odr and linkonce_odr
symbols, used for the vtables, and that _must_ be unique for
dynamic_cast to work.

Attached are two patches: the first adds a (failing) testcase, the
second fixes the issue.

I'm not familiar with patch submission on this list, let me know if
there's a better way to submit patches.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-add-testcase-for-weak_odr-and-linkonce_odr-in-JIT.patch
Type: text/x-diff
Size: 2683 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110315/f74220f3/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-JIT-fix-linkage-of-weak-and-linkonce-symbols.patch
Type: text/x-diff
Size: 2880 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110315/f74220f3/attachment-0001.patch>
-------------- next part --------------

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/


More information about the llvm-dev mailing list