<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - MCJIT/ELF should support MSVC C++ mangled symbols"
href="http://llvm.org/bugs/show_bug.cgi?id=21886">21886</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>MCJIT/ELF should support MSVC C++ mangled symbols
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows XP
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>MC
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>benoit.belley@autodesk.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=13517" name="attach_13517" title="[PATCH] Proposed fix & regression test">attachment 13517</a> <a href="attachment.cgi?id=13517&action=edit" title="[PATCH] Proposed fix & regression test">[details]</a></span>
[PATCH] Proposed fix & regression test
We have found a problem while using the MCJIT engine on Windows. Our jitted
code is invoking some external C++ functions. These external functions have
names that are mangled using the MSVC C++ naming convention. These were not
handled properly by the ELObjectWriter.
The ELF format is used on Windows by the MCJIT engine. Thus, on Windows, the
ELFObjectWriter can encounter symbols mangled using the MS Visual Studio C++
name mangling. Symbols mangled using the MSVC C++ name mangling can legally
have "@@@" as a substring. The EFLObjectWriter should not interpret the "@@@"
substring as specifying
GNU-style symbol versioning. The ELFObjectWriter therefore check for the MSVC
C++ name mangling prefix which is either "?", "@?", "__imp_?" or "__imp_?@".
The attached patch addresses this issue. The patch is against the LLVM
release_35 branch (Revision 223459). The patch also includes a regression test.
We have successfully ran all LLVM & Clang regression tests after applying the
patch on both Debug+Assert and Release builds.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>