[llvm-bugs] [Bug 35733] New: Missing leading underscore for 32-bit stdcall exports
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Dec 22 09:02:31 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35733
Bug ID: 35733
Summary: Missing leading underscore for 32-bit stdcall exports
Product: lld
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: COFF
Assignee: unassignedbugs at nondot.org
Reporter: dmajor at mozilla.com
CC: llvm-bugs at lists.llvm.org, martin at martin.st,
ruiu at google.com
This issue seems to be related to these comments:
https://github.com/llvm-mirror/lld/commit/8d204330ce9e409daa35122ab8f7f41ad21ec7a5#diff-eebfbebe9c16932e0adf459e31f5428fR44
https://github.com/llvm-mirror/llvm/blame/4604874612fa292ab4c49f96aedefdf8be1ff27e/lib/Object/COFFModuleDefinition.cpp#L76
This trips some fatal assertions in Firefox, where the sandbox code (taken from
Chromium) tries to do things like `GetProcAddress(...,
"_TargetNtMapViewOfSection at 44")`.
---
E:\repro\mangle>type hi.cpp
extern "C" __declspec(dllexport) __stdcall void Test(int) { }
int main() { return 0; }
E:\repro\mangle>clang-cl -m32 -c hi.cpp
E:\repro\mangle>lld-link -nodefaultlib -entry:main hi.obj
E:\repro\mangle>llvm-readobj -coff-exports hi.exe | findstr Test
Name: Test at 4 <--- no underscore
E:\repro\mangle>link -nologo -nodefaultlib -entry:main hi.obj
Creating library hi.lib and object hi.exp
E:\repro\mangle>llvm-readobj -coff-exports hi.exe | findstr Test
Name: _Test at 4 <--- with underscore
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171222/529086c6/attachment-0001.html>
More information about the llvm-bugs
mailing list