<html>
    <head>
      <base href="http://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 --- - Emitting an obj file using TargetMachine::addPassesToEmitFile (passManager, formattedStream, TargetMachine::CGFT_ObjectFile) creates a broken COFF object file"
   href="http://llvm.org/bugs/show_bug.cgi?id=18308">18308</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Emitting an obj file using TargetMachine::addPassesToEmitFile (passManager, formattedStream, TargetMachine::CGFT_ObjectFile) creates a broken COFF object file
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>Backend: X86
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>d.albuschat@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=11772" name="attach_11772" title="Program that creates a broken COFF object file">attachment 11772</a> <a href="attachment.cgi?id=11772&action=edit" title="Program that creates a broken COFF object file">[details]</a></span>
Program that creates a broken COFF object file

I'm using the attached program to create an .obj file on Windows 8.1.
llvm and the test program are compiled with VS 2013.
I've integrated compiler-rt, clang and lld into my llvm checkout, if that
matters. Revision of llvm is 197877, as of Sunday, 22nd December at 11:23.

The program creates an obj file, but hat file is broken.
Here's what dumpbin says:

<span class="quote">> dumpbin llvmPlaygroundDoWhile.obj</span >
Microsoft (R) COFF/PE Dumper Version 11.00.60610.1
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file llvmPlaygroundDoWhile.obj

File Type: COFF OBJECT
llvmPlaygroundDoWhile.obj : warning LNK4040: Beschädigte Zeichenfolgentabelle
(Größe); Zeichenfolgentabelle wird ignoriert.
LINK : fatal error LNK1235: Beschädigte oder ungültige COFF-Symboltabelle.

Sorry for the German output. It says something like:
Damaged symboltable (size); Symboltable will be ignored.
LNK1235: Damaged or invalid COFF-Symboltable.</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>