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: unassignedb...@nondot.org
          Reporter: kev...@freebsd.org
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to