// SPDX-License-Identifier: GPL-2.0 #include <linux/export.h> #include <linux/sched.h> #include <linux/personality.h> #include <linux/binfmts.h> #include <linux/elf.h> #include <linux/elf-fdpic.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 | 28 | 93.33% | 1 | 50.00% |
Makito SHIOKAWA | 2 | 6.67% | 1 | 50.00% |
Total | 30 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Nico Pitre | 79 | 100.00% | 1 | 100.00% |
Total | 79 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Russell King | 266 | 68.21% | 2 | 25.00% |
Nico Pitre | 117 | 30.00% | 2 | 25.00% |
David Howells | 3 | 0.77% | 1 | 12.50% |
Makito SHIOKAWA | 2 | 0.51% | 1 | 12.50% |
Greg Kroah-Hartman | 1 | 0.26% | 1 | 12.50% |
Paul Gortmaker | 1 | 0.26% | 1 | 12.50% |
Total | 390 | 100.00% | 8 | 100.00% |