Add support to detect arm hard float ABI based binaries for ABISysV_arm

This patch adds logic to detect if underlying binary is using arm hard float abi and use that information while handling return values in ABISysV_arm.

Differential revision: http://reviews.llvm.org/D16627

llvm-svn: 259885
This commit is contained in:
Omair Javaid
2016-02-05 14:37:53 +00:00
parent 0c9772e874
commit 0a76722518
4 changed files with 63 additions and 7 deletions

View File

@@ -1562,6 +1562,15 @@ ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl &section_headers,
}
}
if (arch_spec.GetMachine() == llvm::Triple::arm ||
arch_spec.GetMachine() == llvm::Triple::thumb)
{
if (header.e_flags & llvm::ELF::EF_ARM_SOFT_FLOAT)
arch_spec.SetFlags (ArchSpec::eARM_abi_soft_float);
else if (header.e_flags & llvm::ELF::EF_ARM_VFP_FLOAT)
arch_spec.SetFlags (ArchSpec::eARM_abi_hard_float);
}
// If there are no section headers we are done.
if (header.e_shnum == 0)
return 0;