<html>
    <head>
      <base href="https://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 --- - LLD's PE symbol tables are corrupted by mt.exe"
   href="https://llvm.org/bugs/show_bug.cgi?id=24476">24476</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLD's PE symbol tables are corrupted by mt.exe
          </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>Windows NT
          </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>All Bugs
          </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>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>cmake runs mt.exe on the linker output after the linker finishes to embed
Windows manifest files in the binary. mt.exe doesn't expect to find a
COFF-style symbol table in a PE image, so the PointerToSymbolTable field ends
up pointing past the end of the binary.

At high level, I'm trying to self-host clang with lld and asan on Windows. I
need to preserve the PE symbol table so that the long section names used by
DWARF (.debug_info) work.

For now, I can convince cmake that it doesn't need to add a manifest to our
binaries, and that will probably work. However, it would be nice if LLD or LLVM
provided some solution, like a replacement for mt.exe if it's trivial, that
avoided the problem altogether.</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>