kernel-2_6_6-1_441
[linux-2.6.git] / arch / ia64 / ia32 / binfmt_elf32.c
index 30f2b84..a8becf0 100644 (file)
@@ -218,3 +218,16 @@ elf32_map (struct file *filep, unsigned long addr, struct elf_phdr *eppnt, int p
        return ia32_do_mmap(filep, (addr & IA32_PAGE_MASK), eppnt->p_filesz + pgoff, prot, type,
                            eppnt->p_offset - pgoff);
 }
+
+#define cpu_uses_ia32el()      (local_cpu_data->family > 0x1f)
+
+static int __init check_elf32_binfmt(void)
+{
+       if (cpu_uses_ia32el()) {
+               printk("Please use IA-32 EL for executing IA-32 binaries\n");
+               return unregister_binfmt(&elf_format);
+       }
+       return 0;
+}
+
+module_init(check_elf32_binfmt)