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:
@@ -1562,6 +1562,15 @@ ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl §ion_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;
|
||||
|
||||
Reference in New Issue
Block a user