diff options
Diffstat (limited to 'arch/arm/kernel/elf.c')
-rw-r--r-- | arch/arm/kernel/elf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/kernel/elf.c b/arch/arm/kernel/elf.c index 513f332f040d..84849098c8e8 100644 --- a/arch/arm/kernel/elf.c +++ b/arch/arm/kernel/elf.c | |||
@@ -21,12 +21,16 @@ int elf_check_arch(const struct elf32_hdr *x) | |||
21 | 21 | ||
22 | eflags = x->e_flags; | 22 | eflags = x->e_flags; |
23 | if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN) { | 23 | if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN) { |
24 | unsigned int flt_fmt; | ||
25 | |||
24 | /* APCS26 is only allowed if the CPU supports it */ | 26 | /* APCS26 is only allowed if the CPU supports it */ |
25 | if ((eflags & EF_ARM_APCS_26) && !(elf_hwcap & HWCAP_26BIT)) | 27 | if ((eflags & EF_ARM_APCS_26) && !(elf_hwcap & HWCAP_26BIT)) |
26 | return 0; | 28 | return 0; |
27 | 29 | ||
30 | flt_fmt = eflags & (EF_ARM_VFP_FLOAT | EF_ARM_SOFT_FLOAT); | ||
31 | |||
28 | /* VFP requires the supporting code */ | 32 | /* VFP requires the supporting code */ |
29 | if ((eflags & EF_ARM_VFP_FLOAT) && !(elf_hwcap & HWCAP_VFP)) | 33 | if (flt_fmt == EF_ARM_VFP_FLOAT && !(elf_hwcap & HWCAP_VFP)) |
30 | return 0; | 34 | return 0; |
31 | } | 35 | } |
32 | return 1; | 36 | return 1; |