]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/kernel/elf.c
[ARM] fix VFP+softfloat binaries
[linux-2.6-omap-h63xx.git] / arch / arm / kernel / elf.c
index 513f332f040d6f6227e1f4d7a551c4729e843a4c..84849098c8e8139da19ae6b8d8fecd089539ee30 100644 (file)
@@ -21,12 +21,16 @@ int elf_check_arch(const struct elf32_hdr *x)
 
        eflags = x->e_flags;
        if ((eflags & EF_ARM_EABI_MASK) == EF_ARM_EABI_UNKNOWN) {
+               unsigned int flt_fmt;
+
                /* APCS26 is only allowed if the CPU supports it */
                if ((eflags & EF_ARM_APCS_26) && !(elf_hwcap & HWCAP_26BIT))
                        return 0;
 
+               flt_fmt = eflags & (EF_ARM_VFP_FLOAT | EF_ARM_SOFT_FLOAT);
+
                /* VFP requires the supporting code */
-               if ((eflags & EF_ARM_VFP_FLOAT) && !(elf_hwcap & HWCAP_VFP))
+               if (flt_fmt == EF_ARM_VFP_FLOAT && !(elf_hwcap & HWCAP_VFP))
                        return 0;
        }
        return 1;