/linux/arch/powerpc/boot/ |
A D | elf_util.c | 20 if (!(elf64->e_ident[EI_MAG0] == ELFMAG0 && in parse_elf64() 21 elf64->e_ident[EI_MAG1] == ELFMAG1 && in parse_elf64() 22 elf64->e_ident[EI_MAG2] == ELFMAG2 && in parse_elf64() 23 elf64->e_ident[EI_MAG3] == ELFMAG3 && in parse_elf64() 24 elf64->e_ident[EI_CLASS] == ELFCLASS64 && in parse_elf64() 26 elf64->e_ident[EI_DATA] == ELFDATA2LSB && in parse_elf64() 28 elf64->e_ident[EI_DATA] == ELFDATA2MSB && in parse_elf64() 56 if (!(elf32->e_ident[EI_MAG0] == ELFMAG0 && in parse_elf32() 57 elf32->e_ident[EI_MAG1] == ELFMAG1 && in parse_elf32() 58 elf32->e_ident[EI_MAG2] == ELFMAG2 && in parse_elf32() [all …]
|
/linux/tools/perf/util/ |
A D | symbol-minimal.c | 94 u8 e_ident[EI_NIDENT]; in filename__read_build_id() local 103 if (fread(e_ident, sizeof(e_ident), 1, fp) != 1) in filename__read_build_id() 106 if (memcmp(e_ident, ELFMAG, SELFMAG) || in filename__read_build_id() 107 e_ident[EI_VERSION] != EV_CURRENT) in filename__read_build_id() 110 need_swap = check_need_swap(e_ident[EI_DATA]); in filename__read_build_id() 115 if (e_ident[EI_CLASS] == ELFCLASS32) { in filename__read_build_id() 303 u8 e_ident[EI_NIDENT]; in fd__is_64_bit() local 308 if (readn(fd, e_ident, sizeof(e_ident)) != sizeof(e_ident)) in fd__is_64_bit() 311 if (memcmp(e_ident, ELFMAG, SELFMAG) || in fd__is_64_bit() 312 e_ident[EI_VERSION] != EV_CURRENT) in fd__is_64_bit() [all …]
|
/linux/kernel/ |
A D | kexec_elf.c | 31 if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) in elf64_to_cpu() 33 else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) in elf64_to_cpu() 41 if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) in elf32_to_cpu() 43 else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) in elf32_to_cpu() 51 if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB) in elf16_to_cpu() 53 else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB) in elf16_to_cpu() 129 memcpy(ehdr->e_ident, buf, sizeof(ehdr->e_ident)); in elf_read_ehdr() 135 if (ehdr->e_ident[EI_CLASS] != ELF_CLASS) { in elf_read_ehdr() 139 ehdr->e_ident[EI_DATA] != ELFDATA2MSB) { in elf_read_ehdr() 160 switch (ehdr->e_ident[EI_CLASS]) { in elf_read_ehdr() [all …]
|
/linux/drivers/remoteproc/ |
A D | remoteproc_elf_helpers.h | 27 return ehdr->e_ident[EI_CLASS]; in fw_elf_get_class() 32 memcpy(hdr->e_ident, ELFMAG, SELFMAG); in elf_hdr_init_ident() 33 hdr->e_ident[EI_CLASS] = class; in elf_hdr_init_ident() 34 hdr->e_ident[EI_DATA] = ELFDATA2LSB; in elf_hdr_init_ident() 35 hdr->e_ident[EI_VERSION] = EV_CURRENT; in elf_hdr_init_ident() 36 hdr->e_ident[EI_OSABI] = ELFOSABI_NONE; in elf_hdr_init_ident()
|
A D | remoteproc_elf_loader.c | 64 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG)) { 69 class = ehdr->e_ident[EI_CLASS]; 82 if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB) { 84 if (ehdr->e_ident[EI_DATA] != ELFDATA2MSB) {
|
/linux/tools/testing/selftests/proc/ |
A D | proc-pid-vm.c | 79 uint8_t e_ident[16]; member 162 h.e_ident[0] = 0x7f; in make_exe() 163 h.e_ident[1] = 'E'; in make_exe() 164 h.e_ident[2] = 'L'; in make_exe() 165 h.e_ident[3] = 'F'; in make_exe() 166 h.e_ident[4] = 2; in make_exe() 167 h.e_ident[5] = 1; in make_exe() 168 h.e_ident[6] = 1; in make_exe() 169 h.e_ident[7] = 0; in make_exe()
|
/linux/arch/mips/tools/ |
A D | elf-entry.c | 58 if (memcmp(hdr.ehdr32.e_ident, ELFMAG, SELFMAG)) { in main() 63 switch (hdr.ehdr32.e_ident[EI_CLASS]) { in main() 65 switch (hdr.ehdr32.e_ident[EI_DATA]) { in main() 82 switch (hdr.ehdr32.e_ident[EI_DATA]) { in main()
|
A D | loongson3-llsc-check.c | 270 if (memcmp(eh->e_ident, ELFMAG, SELFMAG)) { in main() 275 if (eh->e_ident[EI_CLASS] != ELFCLASS64) { in main() 280 if (eh->e_ident[EI_DATA] != ELFDATA2LSB) { in main()
|
/linux/arch/arm64/kvm/hyp/nvhe/ |
A D | gen-hyprel.c | 280 assert_eq(elf.ehdr->e_ident[EI_MAG0], ELFMAG0, "0x%x"); in init_elf() 281 assert_eq(elf.ehdr->e_ident[EI_MAG1], ELFMAG1, "0x%x"); in init_elf() 282 assert_eq(elf.ehdr->e_ident[EI_MAG2], ELFMAG2, "0x%x"); in init_elf() 283 assert_eq(elf.ehdr->e_ident[EI_MAG3], ELFMAG3, "0x%x"); in init_elf() 286 assert_eq(elf.ehdr->e_ident[EI_CLASS], ELFCLASS64, "%u"); in init_elf() 287 assert_eq(elf.ehdr->e_ident[EI_DATA], ELFENDIAN, "%u"); in init_elf()
|
/linux/arch/mips/boot/tools/ |
A 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()
|
A 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/arch/x86/tools/ |
A 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/scripts/ |
A D | sorttable.c | 335 switch (ehdr->e_ident[EI_DATA]) { in do_file() 354 ehdr->e_ident[EI_DATA], fname); in do_file() 358 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 || in do_file() 360 ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file() 395 switch (ehdr->e_ident[EI_CLASS]) { in do_file() 420 ehdr->e_ident[EI_CLASS], fname); in do_file()
|
A 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()
|
A D | recordmcount.c | 490 switch (ehdr->e_ident[EI_DATA]) { in do_file() 494 ehdr->e_ident[EI_DATA], fname); in do_file() 523 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 || in do_file() 525 ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file() 576 switch (ehdr->e_ident[EI_CLASS]) { in do_file() 579 ehdr->e_ident[EI_CLASS], fname); in do_file()
|
/linux/arch/mips/vdso/ |
A D | genvdso.c | 141 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) { in map_vdso() 148 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/arch/parisc/boot/compressed/ |
A D | misc.c | 246 if (ehdr.e_ident[EI_MAG0] != ELFMAG0 || in parse_elf() 247 ehdr.e_ident[EI_MAG1] != ELFMAG1 || in parse_elf() 248 ehdr.e_ident[EI_MAG2] != ELFMAG2 || in parse_elf() 249 ehdr.e_ident[EI_MAG3] != ELFMAG3) { in parse_elf()
|
/linux/arch/arm/vdso/ |
A D | vdsomunge.c | 153 if (memcmp(&inhdr->e_ident, ELFMAG, SELFMAG) != 0) in main() 156 if (inhdr->e_ident[EI_CLASS] != ELFCLASS32) in main() 159 swap = inhdr->e_ident[EI_DATA] != HOST_ORDER; in main()
|
/linux/fs/proc/ |
A D | vmcore.c | 1245 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 || in parse_crash_elf64_headers() 1248 ehdr.e_ident[EI_CLASS] != ELFCLASS64 || in parse_crash_elf64_headers() 1249 ehdr.e_ident[EI_VERSION] != EV_CURRENT || in parse_crash_elf64_headers() 1304 ehdr.e_ident[EI_CLASS] != ELFCLASS32|| in parse_crash_elf32_headers() 1305 ehdr.e_ident[EI_VERSION] != EV_CURRENT || in parse_crash_elf32_headers() 1344 unsigned char e_ident[EI_NIDENT]; in parse_crash_elf_headers() local 1349 rc = elfcorehdr_read(e_ident, EI_NIDENT, &addr); in parse_crash_elf_headers() 1352 if (memcmp(e_ident, ELFMAG, SELFMAG) != 0) { in parse_crash_elf_headers() 1357 if (e_ident[EI_CLASS] == ELFCLASS64) { in parse_crash_elf_headers() 1361 } else if (e_ident[EI_CLASS] == ELFCLASS32) { in parse_crash_elf_headers() [all …]
|
/linux/arch/x86/boot/compressed/ |
A D | misc.c | 287 if (ehdr.e_ident[EI_MAG0] != ELFMAG0 || in parse_elf() 288 ehdr.e_ident[EI_MAG1] != ELFMAG1 || in parse_elf() 289 ehdr.e_ident[EI_MAG2] != ELFMAG2 || in parse_elf() 290 ehdr.e_ident[EI_MAG3] != ELFMAG3) { in parse_elf()
|
/linux/lib/ |
A D | buildid.c | 147 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) in build_id_parse() 154 if (ehdr->e_ident[EI_CLASS] == ELFCLASS32) in build_id_parse() 156 else if (ehdr->e_ident[EI_CLASS] == ELFCLASS64) in build_id_parse()
|
/linux/arch/s390/include/asm/ |
A D | elf.h | 180 && (x)->e_ident[EI_CLASS] == ELF_CLASS) 183 && (x)->e_ident[EI_CLASS] == ELF_CLASS) 264 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) { \
|
/linux/arch/parisc/include/asm/ |
A D | elf.h | 247 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) { \ 312 ((x)->e_machine == EM_PARISC && (x)->e_ident[EI_CLASS] == ELF_CLASS) 314 ((x)->e_machine == EM_PARISC && (x)->e_ident[EI_CLASS] == ELFCLASS32)
|
/linux/arch/powerpc/platforms/powernv/ |
A D | opal-core.c | 357 memcpy(elf->e_ident, ELFMAG, SELFMAG); in create_opalcore() 358 elf->e_ident[EI_CLASS] = ELF_CLASS; in create_opalcore() 359 elf->e_ident[EI_DATA] = ELFDATA2MSB; in create_opalcore() 360 elf->e_ident[EI_VERSION] = EV_CURRENT; in create_opalcore() 361 elf->e_ident[EI_OSABI] = ELF_OSABI; in create_opalcore() 362 memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD); in create_opalcore()
|
/linux/arch/mips/kernel/ |
A D | elf.c | 90 elf32 = ehdr->e32.e_ident[EI_CLASS] == ELFCLASS32; in arch_elf_pt_proc() 150 elf32 = ehdr->e32.e_ident[EI_CLASS] == ELFCLASS32; in arch_check_elf() 172 ielf32 = iehdr->e32.e_ident[EI_CLASS] == ELFCLASS32; in arch_check_elf()
|