<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 - majorOSVersion and majorSubsystemVersion are set into too large values"
   href="https://bugs.llvm.org/show_bug.cgi?id=52227">52227</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>majorOSVersion and majorSubsystemVersion are set into too large values
          </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>Linux
          </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>kolan_n@mail.ru
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=25375" name="attach_25375" title="Added support of Windows XP for the files generated by Clang and lld.">attachment 25375</a> <a href="attachment.cgi?id=25375&action=edit" title="Added support of Windows XP for the files generated by Clang and lld.">[details]</a></span>
Added support of Windows XP for the files generated by Clang and lld.

The too high values in these fields cause inability to run the programs
compiled with Clang (using MinGW-w64 free and open source runtime) on Windows
XP and ReactOS.

I have implemented the patch intended to fix that. This patch sets the version
to 4.0 - the one used in MinGW shared libs.

I haven't tested this patch myself, because compiling llvm is time- and
resource-consuming proccess, but I have implemented a stopgap tool in python
for patching PE headers, <a href="https://github.com/KOLANICH-tools/PEHeaderFixer.py">https://github.com/KOLANICH-tools/PEHeaderFixer.py</a> ,
and used it to patch the binaries generated by LLD 14 + CLang 14. The resulting
binaries have worked fine on XP and ReactOS.</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>