<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 - Setting VFP Flag on ELF binaries"
   href="https://bugs.llvm.org/show_bug.cgi?id=36009">36009</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Setting VFP Flag on ELF binaries
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>FreeBSD
          </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>ELF
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>kevans@FreeBSD.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Hi,

We're working on linking the FreeBSD base system with LLD on ARMv7. We've
discovered that LLD is not setting the VFP flag on the ELFs it's producing,
which we need for rtld to use the hard-float libraries.

Using -target armv7-gnueabihf-freebsd12.0 yields, as an example, the following:

ELF Header:
  Magic:   7f 45 4c 46 01 01 01 09 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            FreeBSD
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x14000
  Start of program headers:          52 (bytes into file)
  Start of section headers:          170068 (bytes into file)
  Flags:                             0x5000000, Version5 EABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         11
  Size of section headers:           40 (bytes)
  Number of section headers:         34
  Section header string table index: 31

Hacking it in by OR'ing EF_ARM_VFP_FLOAT here:
<a href="http://src.illumos.org/source/xref/freebsd-head/contrib/llvm/tools/lld/ELF/Arch/ARM.cpp#103">http://src.illumos.org/source/xref/freebsd-head/contrib/llvm/tools/lld/ELF/Arch/ARM.cpp#103</a>
at least gives me a bootable system that works so far, but this is presumably
not ideal. =)</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>