[llvm-bugs] [Bug 36009] New: Setting VFP Flag on ELF binaries

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 18 19:35:46 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=36009

            Bug ID: 36009
           Summary: Setting VFP Flag on ELF binaries
           Product: lld
           Version: unspecified
          Hardware: Other
                OS: FreeBSD
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: kevans at FreeBSD.org
                CC: llvm-bugs at lists.llvm.org

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180119/d3e391f4/attachment.html>


More information about the llvm-bugs mailing list