| /linux/arch/powerpc/boot/ |
| H 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 …]
|
| H A D | elf.h | 56 unsigned char e_ident[EI_NIDENT]; member 73 unsigned char e_ident[16]; /* ELF "magic number" */ member
|
| /linux/tools/perf/util/ |
| H A D | symbol-minimal.c | 116 if (read(fd, hdrs.ehdr32.e_ident, EI_NIDENT) != EI_NIDENT) in filename__read_build_id() 119 if (memcmp(hdrs.ehdr32.e_ident, ELFMAG, SELFMAG) || in filename__read_build_id() 120 hdrs.ehdr32.e_ident[EI_VERSION] != EV_CURRENT) in filename__read_build_id() 123 need_swap = check_need_swap(hdrs.ehdr32.e_ident[EI_DATA]); in filename__read_build_id() 124 elf32 = hdrs.ehdr32.e_ident[EI_CLASS] == ELFCLASS32; in filename__read_build_id() 285 u8 e_ident[EI_NIDENT]; in fd__is_64_bit() local 290 if (readn(fd, e_ident, sizeof(e_ident)) != sizeof(e_ident)) in fd__is_64_bit() 293 if (memcmp(e_ident, ELFMAG, SELFMAG) || in fd__is_64_bit() 294 e_ident[EI_VERSION] != EV_CURRENT) in fd__is_64_bit() 297 return e_ident[EI_CLASS] == ELFCLASS64; in fd__is_64_bit()
|
| /linux/scripts/ |
| H A D | elf-parse.c | 60 switch (ehdr->e32.e_ident[EI_DATA]) { in elf_parse() 77 ehdr->e32.e_ident[EI_DATA], fname); in elf_parse() 81 if (memcmp(ELFMAG, ehdr->e32.e_ident, SELFMAG) != 0 || in elf_parse() 82 ehdr->e32.e_ident[EI_VERSION] != EV_CURRENT) { in elf_parse() 93 switch (ehdr->e32.e_ident[EI_CLASS]) { in elf_parse() 157 ehdr->e32.e_ident[EI_CLASS], fname); in elf_parse() 174 return ehdr->e32.e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8; in elf_map_long_size()
|
| H 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()
|
| H A D | recordmcount.c | 524 switch (ehdr->e_ident[EI_DATA]) { in do_file() 528 ehdr->e_ident[EI_DATA], fname); in do_file() 557 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 || in do_file() 559 ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file() 610 switch (ehdr->e_ident[EI_CLASS]) { in do_file() 613 ehdr->e_ident[EI_CLASS], fname); in do_file()
|
| /linux/drivers/remoteproc/ |
| H 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()
|
| H 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/arch/mips/tools/ |
| H 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()
|
| H 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/ |
| H A D | gen-hyprel.c | 283 assert_eq(elf.ehdr->e_ident[EI_MAG0], ELFMAG0, "0x%x"); in init_elf() 284 assert_eq(elf.ehdr->e_ident[EI_MAG1], ELFMAG1, "0x%x"); in init_elf() 285 assert_eq(elf.ehdr->e_ident[EI_MAG2], ELFMAG2, "0x%x"); in init_elf() 286 assert_eq(elf.ehdr->e_ident[EI_MAG3], ELFMAG3, "0x%x"); in init_elf() 289 assert_eq(elf.ehdr->e_ident[EI_CLASS], ELFCLASS64, "%u"); in init_elf() 290 assert_eq(elf.ehdr->e_ident[EI_DATA], ELFENDIAN, "%u"); in init_elf()
|
| /linux/arch/mips/boot/tools/ |
| H 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()
|
| H A D | relocs.c | 164 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) in elf16_to_cpu() 172 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) in elf32_to_cpu() 180 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) in cpu_to_elf32() 192 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) in elf64_to_cpu() 211 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) in read_ehdr() 214 if (ehdr.e_ident[EI_CLASS] != ELF_CLASS) in read_ehdr() 217 if ((ehdr.e_ident[EI_DATA] != ELFDATA2LSB) && in read_ehdr() 218 (ehdr.e_ident[EI_DATA] != ELFDATA2MSB)) in read_ehdr() 221 if (ehdr.e_ident[EI_VERSION] != EV_CURRENT) in read_ehdr()
|
| /linux/arch/s390/tools/ |
| H A D | relocs.c | 82 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) in elf16_to_cpu() 90 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB) in elf32_to_cpu() 122 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) in read_ehdr() 124 if (ehdr.e_ident[EI_CLASS] != ELF_CLASS) in read_ehdr() 126 if (ehdr.e_ident[EI_DATA] != ELF_ENDIAN) in read_ehdr() 128 if (ehdr.e_ident[EI_VERSION] != EV_CURRENT) in read_ehdr() 363 unsigned char e_ident[EI_NIDENT]; in main() local 378 if (fread(&e_ident, 1, EI_NIDENT, fp) != EI_NIDENT) in main()
|
| /linux/tools/testing/selftests/proc/ |
| H A D | proc-pid-vm.c | 86 uint8_t e_ident[16]; member 169 h.e_ident[0] = 0x7f; in make_exe() 170 h.e_ident[1] = 'E'; in make_exe() 171 h.e_ident[2] = 'L'; in make_exe() 172 h.e_ident[3] = 'F'; in make_exe() 173 h.e_ident[4] = 2; in make_exe() 174 h.e_ident[5] = 1; in make_exe() 175 h.e_ident[6] = 1; in make_exe() 176 h.e_ident[7] = 0; in make_exe()
|
| /linux/arch/x86/tools/ |
| H 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/fs/proc/ |
| H A D | vmcore.c | 1227 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 || in parse_crash_elf64_headers() 1230 ehdr.e_ident[EI_CLASS] != ELFCLASS64 || in parse_crash_elf64_headers() 1231 ehdr.e_ident[EI_VERSION] != EV_CURRENT || in parse_crash_elf64_headers() 1283 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 || in parse_crash_elf32_headers() 1286 ehdr.e_ident[EI_CLASS] != ELFCLASS32|| in parse_crash_elf32_headers() 1287 ehdr.e_ident[EI_VERSION] != EV_CURRENT || in parse_crash_elf32_headers() 1326 unsigned char e_ident[EI_NIDENT]; in parse_crash_elf_headers() local 1331 rc = elfcorehdr_read(e_ident, EI_NIDENT, &addr); in parse_crash_elf_headers() 1334 if (memcmp(e_ident, ELFMAG, SELFMAG) != 0) { in parse_crash_elf_headers() 1339 if (e_ident[EI_CLASS] == ELFCLASS64) { in parse_crash_elf_headers() [all …]
|
| /linux/arch/arm/vdso/ |
| H 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/kernel/ |
| H A D | crash_core.c | 209 memcpy(ehdr->e_ident, ELFMAG, SELFMAG); in crash_prepare_elf64_headers() 210 ehdr->e_ident[EI_CLASS] = ELFCLASS64; in crash_prepare_elf64_headers() 211 ehdr->e_ident[EI_DATA] = ELFDATA2LSB; in crash_prepare_elf64_headers() 212 ehdr->e_ident[EI_VERSION] = EV_CURRENT; in crash_prepare_elf64_headers() 213 ehdr->e_ident[EI_OSABI] = ELF_OSABI; in crash_prepare_elf64_headers() 214 memset(ehdr->e_ident + EI_PAD, 0, EI_NIDENT - EI_PAD); in crash_prepare_elf64_headers()
|
| /linux/arch/x86/boot/compressed/ |
| H A D | misc.c | 294 if (ehdr.e_ident[EI_MAG0] != ELFMAG0 || in parse_elf() 295 ehdr.e_ident[EI_MAG1] != ELFMAG1 || in parse_elf() 296 ehdr.e_ident[EI_MAG2] != ELFMAG2 || in parse_elf() 297 ehdr.e_ident[EI_MAG3] != ELFMAG3) in parse_elf()
|
| /linux/arch/parisc/include/asm/ |
| H A D | elf.h | 246 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) { \ 311 ((x)->e_machine == EM_PARISC && (x)->e_ident[EI_CLASS] == ELF_CLASS) 313 ((x)->e_machine == EM_PARISC && (x)->e_ident[EI_CLASS] == ELFCLASS32)
|
| /linux/arch/powerpc/platforms/powernv/ |
| H A D | opal-core.c | 359 memcpy(elf->e_ident, ELFMAG, SELFMAG); in create_opalcore() 360 elf->e_ident[EI_CLASS] = ELF_CLASS; in create_opalcore() 361 elf->e_ident[EI_DATA] = ELFDATA2MSB; in create_opalcore() 362 elf->e_ident[EI_VERSION] = EV_CURRENT; in create_opalcore() 363 elf->e_ident[EI_OSABI] = ELF_OSABI; in create_opalcore() 364 memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD); in create_opalcore()
|
| /linux/arch/riscv/include/asm/ |
| H A D | elf.h | 38 ((x)->e_ident[EI_CLASS] == ELF_CLASS)) 138 do { set_compat_task((ex).e_ident[EI_CLASS] == ELFCLASS32); \
|
| /linux/arch/mips/kernel/ |
| H A D | elf.c | 91 elf32 = ehdr->e32.e_ident[EI_CLASS] == ELFCLASS32; in arch_elf_pt_proc() 151 elf32 = ehdr->e32.e_ident[EI_CLASS] == ELFCLASS32; in arch_check_elf() 173 ielf32 = iehdr->e32.e_ident[EI_CLASS] == ELFCLASS32; in arch_check_elf()
|
| /linux/arch/s390/kernel/ |
| H A D | kexec_elf.c | 82 ehdr->e_ident[EI_CLASS] != ELFCLASS64 || in s390_elf_load() 126 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) in s390_elf_probe()
|