Skip to content

emitting .eabi_attribute on ARM #461

Description

@monniaux

Certain embedded toolchains (for assembling and linking) for ARM assume that if a file contains no eabi attribute for floating-point, then it uses soft float. Furthermore, the linker checks that all modules have the same soft/hard float ABI settings. Since CompCert does not emit this attribute, this prevents linking CompCert's output with libraries compiled for hard float.

Solution: emit

  .eabi_attribute Tag_ABI_VFP_args, 1

for hard float parameters (0 for soft float, 3 to say there are no floating-point parameters anyway in this file so it's compatible with both).

See https://reviews.llvm.org/D49993

gcc does set this attribute (instead of printing Tag_ABI_VFP_args it prints its numeric value, 28)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions