<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 --- - linking OpenBSD/amd64 kernel"
   href="https://llvm.org/bugs/show_bug.cgi?id=30815">30815</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>linking OpenBSD/amd64 kernel
          </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>OpenBSD
          </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>ELF
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>brad@comstyle.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>I'm opening this as a tracker for issues that pertain to linking the
OpenBSD/amd64 kernel with lld. With the recent work that went into the
improvements with the linker script support lld can now link the kernel without
any errors or warnings (because of other additional fixes that went in), but
the resulting kernel is not bootable vs the kernel built with bfd (our binutils
2.17 + patches). It looks like it is failing to load the kernel with the boot
loader.

$ make LD=ld            
ld -T ../../../../arch/amd64/conf/ld.script -X --warn-common -nopie -S -o bsd
${SYSTEM_HEAD} vers.o ${OBJS}
text    data    bss     dec     hex
9116384 267112  671744  10055240        996e48
$ rm bsd     
$ make LD=ld.lld        
ld.lld -T ../../../../arch/amd64/conf/ld.script -X --warn-common -nopie -S -o
bsd ${SYSTEM_HEAD} vers.o ${OBJS}
text    data    bss     dec     hex
9120789 267112  671744  10059645        997f7d</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>