/Linux-v4.19/arch/powerpc/boot/ |
D | elf_util.c | 24 if (!(elf64->e_ident[EI_MAG0] == ELFMAG0 && in parse_elf64() 25 elf64->e_ident[EI_MAG1] == ELFMAG1 && in parse_elf64() 26 elf64->e_ident[EI_MAG2] == ELFMAG2 && in parse_elf64() 27 elf64->e_ident[EI_MAG3] == ELFMAG3 && in parse_elf64() 28 elf64->e_ident[EI_CLASS] == ELFCLASS64 && in parse_elf64() 30 elf64->e_ident[EI_DATA] == ELFDATA2LSB && in parse_elf64() 32 elf64->e_ident[EI_DATA] == ELFDATA2MSB && in parse_elf64() 60 if (!(elf32->e_ident[EI_MAG0] == ELFMAG0 && in parse_elf32() 61 elf32->e_ident[EI_MAG1] == ELFMAG1 && in parse_elf32() 62 elf32->e_ident[EI_MAG2] == ELFMAG2 && in parse_elf32() [all …]
|
D | elf.h | 56 unsigned char e_ident[EI_NIDENT]; member 73 unsigned char e_ident[16]; /* ELF "magic number" */ member
|
/Linux-v4.19/tools/perf/util/ |
D | symbol-minimal.c | 89 u8 e_ident[EI_NIDENT]; in filename__read_build_id() local 98 if (fread(e_ident, sizeof(e_ident), 1, fp) != 1) in filename__read_build_id() 101 if (memcmp(e_ident, ELFMAG, SELFMAG) || in filename__read_build_id() 102 e_ident[EI_VERSION] != EV_CURRENT) in filename__read_build_id() 105 need_swap = check_need_swap(e_ident[EI_DATA]); in filename__read_build_id() 110 if (e_ident[EI_CLASS] == ELFCLASS32) { in filename__read_build_id() 298 u8 e_ident[EI_NIDENT]; in fd__is_64_bit() local 303 if (readn(fd, e_ident, sizeof(e_ident)) != sizeof(e_ident)) in fd__is_64_bit() 306 if (memcmp(e_ident, ELFMAG, SELFMAG) || in fd__is_64_bit() 307 e_ident[EI_VERSION] != EV_CURRENT) in fd__is_64_bit() [all …]
|
/Linux-v4.19/arch/powerpc/kernel/ |
D | kexec_elf_64.c | 56 return memcmp(ehdr->e_ident, ELFMAG, SELFMAG) == 0; in elf_is_elf_file() 61 if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) in elf64_to_cpu() 63 else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) in elf64_to_cpu() 71 if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) in elf16_to_cpu() 73 else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) in elf16_to_cpu() 81 if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) in elf32_to_cpu() 83 else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) in elf32_to_cpu() 102 } else if (ehdr->e_ident[EI_VERSION] != EV_CURRENT || in elf_is_ehdr_sane() 159 memcpy(ehdr->e_ident, buf, sizeof(ehdr->e_ident)); in elf_read_ehdr() 165 if (ehdr->e_ident[EI_CLASS] != ELF_CLASS) { in elf_read_ehdr() [all …]
|
/Linux-v4.19/arch/mips/boot/tools/ |
D | relocs_main.c | 35 unsigned char e_ident[EI_NIDENT]; in main() local 75 if (fread(&e_ident, 1, EI_NIDENT, fp) != EI_NIDENT) in main() 79 if (e_ident[EI_CLASS] == ELFCLASS64) in main()
|
D | relocs.c | 163 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) in elf16_to_cpu() 171 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) in elf32_to_cpu() 179 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) in cpu_to_elf32() 191 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) in elf64_to_cpu() 210 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) in read_ehdr() 213 if (ehdr.e_ident[EI_CLASS] != ELF_CLASS) in read_ehdr() 216 if ((ehdr.e_ident[EI_DATA] != ELFDATA2LSB) && in read_ehdr() 217 (ehdr.e_ident[EI_DATA] != ELFDATA2MSB)) in read_ehdr() 220 if (ehdr.e_ident[EI_VERSION] != EV_CURRENT) in read_ehdr()
|
/Linux-v4.19/arch/x86/tools/ |
D | relocs_common.c | 26 unsigned char e_ident[EI_NIDENT]; in main() local 71 if (fread(&e_ident, 1, EI_NIDENT, fp) != EI_NIDENT) { in main() 75 if (e_ident[EI_CLASS] == ELFCLASS64) in main()
|
/Linux-v4.19/scripts/ |
D | sortextable.c | 274 switch (ehdr->e_ident[EI_DATA]) { in do_file() 277 ehdr->e_ident[EI_DATA], fname); in do_file() 297 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 in do_file() 299 || ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file() 332 switch (ehdr->e_ident[EI_CLASS]) { in do_file() 335 ehdr->e_ident[EI_CLASS], fname); in do_file()
|
D | insert-sys-cert.c | 323 if ((hdr->e_ident[EI_MAG0] != ELFMAG0) || in main() 324 (hdr->e_ident[EI_MAG1] != ELFMAG1) || in main() 325 (hdr->e_ident[EI_MAG2] != ELFMAG2) || in main() 326 (hdr->e_ident[EI_MAG3] != ELFMAG3)) { in main() 331 if (hdr->e_ident[EI_CLASS] != CURRENT_ELFCLASS) { in main() 336 if (hdr->e_ident[EI_DATA] != endianness()) { in main()
|
D | recordmcount.c | 459 switch (ehdr->e_ident[EI_DATA]) { in do_file() 463 ehdr->e_ident[EI_DATA], fname); in do_file() 493 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 in do_file() 495 || ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file() 542 switch (ehdr->e_ident[EI_CLASS]) { in do_file() 545 ehdr->e_ident[EI_CLASS], fname); in do_file()
|
/Linux-v4.19/arch/mips/vdso/ |
D | genvdso.c | 143 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) { in map_vdso() 149 elf_class = ehdr->e_ident[EI_CLASS]; in map_vdso() 160 switch (ehdr->e_ident[EI_DATA]) { in map_vdso() 163 need_swap = ehdr->e_ident[EI_DATA] != HOST_ORDER; in map_vdso()
|
/Linux-v4.19/drivers/remoteproc/ |
D | remoteproc_elf_loader.c | 62 class = ehdr->e_ident[EI_CLASS]; 70 if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB) { 72 if (ehdr->e_ident[EI_DATA] != ELFDATA2MSB) { 83 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG)) {
|
/Linux-v4.19/arch/arm/vdso/ |
D | vdsomunge.c | 166 if (memcmp(&inhdr->e_ident, ELFMAG, SELFMAG) != 0) in main() 169 if (inhdr->e_ident[EI_CLASS] != ELFCLASS32) in main() 172 swap = inhdr->e_ident[EI_DATA] != HOST_ORDER; in main()
|
/Linux-v4.19/arch/s390/include/asm/ |
D | elf.h | 152 && (x)->e_ident[EI_CLASS] == ELF_CLASS) 155 && (x)->e_ident[EI_CLASS] == ELF_CLASS) 241 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) { \
|
/Linux-v4.19/arch/x86/boot/compressed/ |
D | misc.c | 282 if (ehdr.e_ident[EI_MAG0] != ELFMAG0 || in parse_elf() 283 ehdr.e_ident[EI_MAG1] != ELFMAG1 || in parse_elf() 284 ehdr.e_ident[EI_MAG2] != ELFMAG2 || in parse_elf() 285 ehdr.e_ident[EI_MAG3] != ELFMAG3) { in parse_elf()
|
/Linux-v4.19/fs/proc/ |
D | vmcore.c | 1175 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 || in parse_crash_elf64_headers() 1178 ehdr.e_ident[EI_CLASS] != ELFCLASS64 || in parse_crash_elf64_headers() 1179 ehdr.e_ident[EI_VERSION] != EV_CURRENT || in parse_crash_elf64_headers() 1231 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 || in parse_crash_elf32_headers() 1234 ehdr.e_ident[EI_CLASS] != ELFCLASS32|| in parse_crash_elf32_headers() 1235 ehdr.e_ident[EI_VERSION] != EV_CURRENT || in parse_crash_elf32_headers() 1274 unsigned char e_ident[EI_NIDENT]; in parse_crash_elf_headers() local 1279 rc = elfcorehdr_read(e_ident, EI_NIDENT, &addr); in parse_crash_elf_headers() 1282 if (memcmp(e_ident, ELFMAG, SELFMAG) != 0) { in parse_crash_elf_headers() 1287 if (e_ident[EI_CLASS] == ELFCLASS64) { in parse_crash_elf_headers() [all …]
|
/Linux-v4.19/arch/parisc/include/asm/ |
D | elf.h | 247 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) { \ 315 ((x)->e_machine == EM_PARISC && (x)->e_ident[EI_CLASS] == ELF_CLASS) 317 ((x)->e_machine == EM_PARISC && (x)->e_ident[EI_CLASS] == ELFCLASS32)
|
/Linux-v4.19/arch/mips/include/asm/ |
D | elf.h | 289 if (__h->e_ident[EI_CLASS] != ELFCLASS32) \ 312 if (__h->e_ident[EI_CLASS] != ELFCLASS64) \ 328 if (__h->e_ident[EI_CLASS] != ELFCLASS32) \ 414 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
|
/Linux-v4.19/arch/mips/kernel/ |
D | elf.c | 92 elf32 = ehdr->e32.e_ident[EI_CLASS] == ELFCLASS32; in arch_elf_pt_proc() 152 elf32 = ehdr->e32.e_ident[EI_CLASS] == ELFCLASS32; in arch_check_elf() 174 ielf32 = iehdr->e32.e_ident[EI_CLASS] == ELFCLASS32; in arch_check_elf()
|
/Linux-v4.19/arch/ia64/hp/sim/boot/ |
D | bootloader.c | 115 if (elf->e_ident[0] == 0x7f && strncmp(elf->e_ident + 1, "ELF", 3) != 0) { in start_bootloader()
|
/Linux-v4.19/arch/s390/kernel/ |
D | kexec_elf.c | 77 ehdr->e_ident[EI_CLASS] != ELFCLASS64 || in s390_elf_load() 138 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) in s390_elf_probe()
|
D | crash_dump.c | 513 memcpy(ehdr->e_ident, ELFMAG, SELFMAG); in ehdr_init() 514 ehdr->e_ident[EI_CLASS] = ELFCLASS64; in ehdr_init() 515 ehdr->e_ident[EI_DATA] = ELFDATA2MSB; in ehdr_init() 516 ehdr->e_ident[EI_VERSION] = EV_CURRENT; in ehdr_init() 517 memset(ehdr->e_ident + EI_PAD, 0, EI_NIDENT - EI_PAD); in ehdr_init()
|
/Linux-v4.19/arch/sparc/vdso/ |
D | vdso2c.c | 154 if (hdr->e_ident[EI_CLASS] == ELFCLASS64) { in go() 157 } else if (hdr->e_ident[EI_CLASS] == ELFCLASS32) { in go()
|
/Linux-v4.19/arch/x86/entry/vdso/ |
D | vdso2c.c | 181 if (hdr->e_ident[EI_CLASS] == ELFCLASS64) { in go() 184 } else if (hdr->e_ident[EI_CLASS] == ELFCLASS32) { in go()
|
/Linux-v4.19/arch/alpha/boot/tools/ |
D | objstrip.c | 151 if (elf->e_ident[0] == 0x7f && strncmp((char *)elf->e_ident + 1, "ELF", 3) == 0) { in main()
|