[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


            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:

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