#include <linux/export.h> #include <linux/sched.h> #include <linux/personality.h> #include <linux/binfmts.h> #include <linux/elf.h> #include <asm/system_info.h>
int elf_check_arch(const struct elf32_hdr *x) { unsigned int eflags; /* Make sure it's an ARM executable */ if (x->e_machine != EM_ARM) return 0; /* Make sure the entry address is reasonable */ if (x->e_entry & 1) { if (!(elf_hwcap & HWCAP_THUMB)) return 0; } else if (x->e_entry & 3) return 0; 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 (flt_fmt == EF_ARM_VFP_FLOAT && !(elf_hwcap & HWCAP_VFP)) return 0; } return 1; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Russell King | 133 | 100.00% | 2 | 100.00% |
Total | 133 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Russell King | 75 | 77.32% | 1 | 50.00% |
Nico Pitre | 22 | 22.68% | 1 | 50.00% |
Total | 97 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Russell King | 34 | 94.44% | 1 | 50.00% |
Makito SHIOKAWA | 2 | 5.56% | 1 | 50.00% |
Total | 36 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Russell King | 272 | 90.67% | 2 | 33.33% |
Nico Pitre | 22 | 7.33% | 1 | 16.67% |
David Howells | 3 | 1.00% | 1 | 16.67% |
Makito SHIOKAWA | 2 | 0.67% | 1 | 16.67% |
Paul Gortmaker | 1 | 0.33% | 1 | 16.67% |
Total | 300 | 100.00% | 6 | 100.00% |