<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - LLD .def file parser cannot resolve names of fastcall exports"
   href="https://bugs.llvm.org/show_bug.cgi?id=33284">33284</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLD .def file parser cannot resolve names of fastcall exports
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>COFF
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rnk@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The Microsoft tools will make a DLL that exports "@foo@8" out of the following
.c file and .def file:

$ cat foo.c
int __fastcall foo(int x, int y) { return x + y; }

$ cat foo.def
EXPORTS
        foo

# Use a 32-bit compiler
$ cl -c foo.c && link -dll -out:foo.dll foo.obj
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

foo.c
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library foo.lib and object foo.exp

$ llvm-nm foo.lib
...
foo.dll:
00000000 T @foo@8
00000000 T __imp_@foo@8

If you substitute lld-link into the above command, I get:
C:\src\llvm-project\build\bin\lld-link.exe: warning: <root>: undefined symbol:
_foo
error: link failed</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>