[pr21886] Change MCJIT/ELF to support MSVC C++ mangled symbol.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 22 Jan 2015 14:20:45 +0000 (14:20 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 22 Jan 2015 14:20:45 +0000 (14:20 +0000)
commit06eb5aad3744336cea6607280edb4491a73b6cc9
tree7c5296f0fe26313e0a80d53f3c5b1a535cbf03ef
parent46b1a316812025f88784ee4a3a9438403f6b18a5
[pr21886] Change MCJIT/ELF to support MSVC C++ mangled symbol.

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_?@".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226830 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/ELFObjectWriter.cpp
test/MC/ELF/symver-msvc.s [new file with mode: 0644]