Home
last modified time | relevance | path

Searched refs:e_ident (Results 1 – 46 of 46) sorted by relevance

/linux-4.4.14/arch/powerpc/boot/
Delf_util.c24 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 …]
Delf.h55 unsigned char e_ident[EI_NIDENT]; member
72 unsigned char e_ident[16]; /* ELF "magic number" */ member
Dof.c57 if (elf64->e_ident[EI_CLASS] == ELFCLASS64) { in of_image_hdr()
/linux-4.4.14/tools/perf/util/
Dsymbol-minimal.c87 u8 e_ident[EI_NIDENT]; in filename__read_build_id() local
96 if (fread(e_ident, sizeof(e_ident), 1, fp) != 1) in filename__read_build_id()
99 if (memcmp(e_ident, ELFMAG, SELFMAG) || in filename__read_build_id()
100 e_ident[EI_VERSION] != EV_CURRENT) in filename__read_build_id()
103 need_swap = check_need_swap(e_ident[EI_DATA]); in filename__read_build_id()
108 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 …]
Dsymbol-elf.c671 if (dso__swap_init(dso, ehdr.e_ident[EI_DATA])) { in symsrc__init()
1313 memcpy(ehdr->e_ident, kehdr->e_ident, EI_NIDENT); in kcore__copy_hdr()
/linux-4.4.14/arch/x86/tools/
Drelocs_common.c25 unsigned char e_ident[EI_NIDENT]; in main() local
70 if (fread(&e_ident, 1, EI_NIDENT, fp) != EI_NIDENT) { in main()
74 if (e_ident[EI_CLASS] == ELFCLASS64) in main()
Drelocs.c339 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) { in read_ehdr()
342 if (ehdr.e_ident[EI_CLASS] != ELF_CLASS) { in read_ehdr()
345 if (ehdr.e_ident[EI_DATA] != ELFDATA2LSB) { in read_ehdr()
348 if (ehdr.e_ident[EI_VERSION] != EV_CURRENT) { in read_ehdr()
/linux-4.4.14/scripts/
Dsortextable.c245 switch (ehdr->e_ident[EI_DATA]) { in do_file()
248 ehdr->e_ident[EI_DATA], fname); in do_file()
268 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 in do_file()
270 || ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file()
297 switch (ehdr->e_ident[EI_CLASS]) { in do_file()
300 ehdr->e_ident[EI_CLASS], fname); in do_file()
Drecordmcount.c410 switch (ehdr->e_ident[EI_DATA]) { in do_file()
414 ehdr->e_ident[EI_DATA], fname); in do_file()
434 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 in do_file()
436 || ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file()
487 switch (ehdr->e_ident[EI_CLASS]) { in do_file()
490 ehdr->e_ident[EI_CLASS], fname); in do_file()
/linux-4.4.14/arch/tile/include/asm/
Delf.h62 ((x)->e_ident[EI_CLASS] == ELF_CLASS && \
63 (x)->e_ident[EI_DATA] == ELF_DATA && \
151 ((x)->e_ident[EI_CLASS] == ELFCLASS32 && \
/linux-4.4.14/arch/s390/include/asm/
Delf.h141 && (x)->e_ident[EI_CLASS] == ELF_CLASS)
144 && (x)->e_ident[EI_CLASS] == ELF_CLASS)
197 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) { \
/linux-4.4.14/arch/mips/vdso/
Dgenvdso.c143 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-4.4.14/drivers/remoteproc/
Dremoteproc_elf_loader.c63 class = ehdr->e_ident[EI_CLASS];
71 if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB) {
73 if (ehdr->e_ident[EI_DATA] != ELFDATA2MSB) {
84 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG)) {
/linux-4.4.14/arch/arm/vdso/
Dvdsomunge.c166 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-4.4.14/arch/x86/boot/compressed/
Dmisc.c348 if (ehdr.e_ident[EI_MAG0] != ELFMAG0 || in parse_elf()
349 ehdr.e_ident[EI_MAG1] != ELFMAG1 || in parse_elf()
350 ehdr.e_ident[EI_MAG2] != ELFMAG2 || in parse_elf()
351 ehdr.e_ident[EI_MAG3] != ELFMAG3) { in parse_elf()
/linux-4.4.14/fs/proc/
Dvmcore.c1013 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 || in parse_crash_elf64_headers()
1016 ehdr.e_ident[EI_CLASS] != ELFCLASS64 || in parse_crash_elf64_headers()
1017 ehdr.e_ident[EI_VERSION] != EV_CURRENT || in parse_crash_elf64_headers()
1069 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 || in parse_crash_elf32_headers()
1072 ehdr.e_ident[EI_CLASS] != ELFCLASS32|| in parse_crash_elf32_headers()
1073 ehdr.e_ident[EI_VERSION] != EV_CURRENT || in parse_crash_elf32_headers()
1112 unsigned char e_ident[EI_NIDENT]; in parse_crash_elf_headers() local
1117 rc = elfcorehdr_read(e_ident, EI_NIDENT, &addr); in parse_crash_elf_headers()
1120 if (memcmp(e_ident, ELFMAG, SELFMAG) != 0) { in parse_crash_elf_headers()
1125 if (e_ident[EI_CLASS] == ELFCLASS64) { in parse_crash_elf_headers()
[all …]
Dkcore.c333 memcpy(elf->e_ident, ELFMAG, SELFMAG); in elf_kcore_store_hdr()
334 elf->e_ident[EI_CLASS] = ELF_CLASS; in elf_kcore_store_hdr()
335 elf->e_ident[EI_DATA] = ELF_DATA; in elf_kcore_store_hdr()
336 elf->e_ident[EI_VERSION]= EV_CURRENT; in elf_kcore_store_hdr()
337 elf->e_ident[EI_OSABI] = ELF_OSABI; in elf_kcore_store_hdr()
338 memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD); in elf_kcore_store_hdr()
/linux-4.4.14/arch/x86/kernel/
Dcrash.c438 memcpy(ehdr->e_ident, ELFMAG, SELFMAG); in prepare_elf64_headers()
439 ehdr->e_ident[EI_CLASS] = ELFCLASS64; in prepare_elf64_headers()
440 ehdr->e_ident[EI_DATA] = ELFDATA2LSB; in prepare_elf64_headers()
441 ehdr->e_ident[EI_VERSION] = EV_CURRENT; in prepare_elf64_headers()
442 ehdr->e_ident[EI_OSABI] = ELF_OSABI; in prepare_elf64_headers()
443 memset(ehdr->e_ident + EI_PAD, 0, EI_NIDENT - EI_PAD); in prepare_elf64_headers()
/linux-4.4.14/arch/ia64/hp/sim/boot/
Dbootloader.c114 if (elf->e_ident[0] == 0x7f && strncmp(elf->e_ident + 1, "ELF", 3) != 0) { in start_bootloader()
/linux-4.4.14/arch/mips/include/asm/
Delf.h232 if (__h->e_ident[EI_CLASS] != ELFCLASS32) \
263 if (__h->e_ident[EI_CLASS] != ELFCLASS64) \
365 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
/linux-4.4.14/arch/mips/kernel/
Delf.c78 if (ehdr32->e_ident[EI_CLASS] == ELFCLASS32) { in arch_elf_pt_proc()
145 is_mips64 = (ehdr->e_ident[EI_CLASS] == ELFCLASS64) || in arch_check_elf()
Dbinfmt_elfn32.c40 if (__h->e_ident[EI_CLASS] != ELFCLASS32) \
Dbinfmt_elfo32.c52 if (__h->e_ident[EI_CLASS] != ELFCLASS32) \
Dvpe.c593 if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) != 0 in vpe_elfload()
830 if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) == 0) { in vpe_release()
/linux-4.4.14/arch/s390/kernel/
Dcrash_dump.c470 memcpy(ehdr->e_ident, ELFMAG, SELFMAG); in ehdr_init()
471 ehdr->e_ident[EI_CLASS] = ELFCLASS64; in ehdr_init()
472 ehdr->e_ident[EI_DATA] = ELFDATA2MSB; in ehdr_init()
473 ehdr->e_ident[EI_VERSION] = EV_CURRENT; in ehdr_init()
474 memset(ehdr->e_ident + EI_PAD, 0, EI_NIDENT - EI_PAD); in ehdr_init()
/linux-4.4.14/arch/x86/entry/vdso/
Dvdso2c.c174 if (hdr->e_ident[EI_CLASS] == ELFCLASS64) { in go()
177 } else if (hdr->e_ident[EI_CLASS] == ELFCLASS32) { in go()
/linux-4.4.14/arch/alpha/boot/tools/
Dobjstrip.c150 if (elf->e_ident[0] == 0x7f && strncmp((char *)elf->e_ident + 1, "ELF", 3) == 0) { in main()
/linux-4.4.14/drivers/media/platform/sti/c8sectpfe/
Dc8sectpfe-core.c992 class = ehdr->e_ident[EI_CLASS]; in c8sectpfe_elf_sanity_check()
998 if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB) { in c8sectpfe_elf_sanity_check()
1008 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG)) { in c8sectpfe_elf_sanity_check()
1015 if (ehdr->e_ident[EI_MAG0] != ELFMAG0 || in c8sectpfe_elf_sanity_check()
1016 ehdr->e_ident[EI_MAG1] != ELFMAG1 || in c8sectpfe_elf_sanity_check()
1017 ehdr->e_ident[EI_MAG2] != ELFMAG2 || in c8sectpfe_elf_sanity_check()
1018 ehdr->e_ident[EI_MAG3] != ELFMAG3) { in c8sectpfe_elf_sanity_check()
/linux-4.4.14/arch/powerpc/kernel/
Dfadump.c769 memcpy(elf->e_ident, ELFMAG, SELFMAG); in fadump_init_elfcore_header()
770 elf->e_ident[EI_CLASS] = ELF_CLASS; in fadump_init_elfcore_header()
771 elf->e_ident[EI_DATA] = ELF_DATA; in fadump_init_elfcore_header()
772 elf->e_ident[EI_VERSION] = EV_CURRENT; in fadump_init_elfcore_header()
773 elf->e_ident[EI_OSABI] = ELF_OSABI; in fadump_init_elfcore_header()
774 memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD); in fadump_init_elfcore_header()
Dprom_init.c775 .e_ident = { 0x7f, 'E', 'L', 'F',
/linux-4.4.14/fs/
Dbinfmt_em86.c35 if (memcmp(elf_ex.e_ident, ELFMAG, SELFMAG) != 0) in load_em86()
Dbinfmt_elf_fdpic.c109 if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) != 0) in is_elf()
1316 memcpy(elf->e_ident, ELFMAG, SELFMAG); in fill_elf_fdpic_header()
1317 elf->e_ident[EI_CLASS] = ELF_CLASS; in fill_elf_fdpic_header()
1318 elf->e_ident[EI_DATA] = ELF_DATA; in fill_elf_fdpic_header()
1319 elf->e_ident[EI_VERSION] = EV_CURRENT; in fill_elf_fdpic_header()
1320 elf->e_ident[EI_OSABI] = ELF_OSABI; in fill_elf_fdpic_header()
1321 memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD); in fill_elf_fdpic_header()
Dbinfmt_elf.c698 if (memcmp(loc->elf_ex.e_ident, ELFMAG, SELFMAG) != 0) in load_elf_binary()
801 if (memcmp(loc->interp_elf_ex.e_ident, ELFMAG, SELFMAG) != 0) in load_elf_binary()
1121 if (memcmp(elf_ex.e_ident, ELFMAG, SELFMAG) != 0) in load_elf_library()
1358 memcpy(elf->e_ident, ELFMAG, SELFMAG); in fill_elf_header()
1359 elf->e_ident[EI_CLASS] = ELF_CLASS; in fill_elf_header()
1360 elf->e_ident[EI_DATA] = ELF_DATA; in fill_elf_header()
1361 elf->e_ident[EI_VERSION] = EV_CURRENT; in fill_elf_header()
1362 elf->e_ident[EI_OSABI] = ELF_OSABI; in fill_elf_header()
/linux-4.4.14/include/uapi/linux/
Delf.h204 unsigned char e_ident[EI_NIDENT]; member
221 unsigned char e_ident[EI_NIDENT]; /* ELF "magic number" */ member
/linux-4.4.14/arch/powerpc/include/asm/
Delf.h94 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
/linux-4.4.14/arch/sparc/include/asm/
Delf_64.h203 do { if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
/linux-4.4.14/sound/pci/mixart/
Dmixart_hwdep.c75 u8 e_ident[16]; member
110 if ( elf32_magic_number[i] != elf_header->e_ident[i] ) in mixart_load_elf()
/linux-4.4.14/arch/parisc/include/asm/
Delf.h312 #define elf_check_arch(x) ((x)->e_machine == EM_PARISC && (x)->e_ident[EI_CLASS] == ELF_CLASS)
/linux-4.4.14/arch/powerpc/oprofile/cell/
Dvma_map.c135 if (memcmp(ehdr.e_ident, expected, EI_PAD) != 0) { in create_vma_map()
/linux-4.4.14/Documentation/vDSO/
Dparse_vdso.c104 if (hdr->e_ident[EI_CLASS] != in vdso_init_from_sysinfo_ehdr()
/linux-4.4.14/scripts/mod/
Dmodpost.c431 if ((hdr->e_ident[EI_MAG0] != ELFMAG0) || in parse_elf()
432 (hdr->e_ident[EI_MAG1] != ELFMAG1) || in parse_elf()
433 (hdr->e_ident[EI_MAG2] != ELFMAG2) || in parse_elf()
434 (hdr->e_ident[EI_MAG3] != ELFMAG3)) { in parse_elf()
/linux-4.4.14/arch/mips/boot/
Delf2ecoff.c313 if (ex.e_ident[EI_DATA] == ELFDATA2MSB) in main()
/linux-4.4.14/kernel/
Dkexec_file.c914 if (memcmp(pi->ehdr->e_ident, ELFMAG, SELFMAG) != 0 in kexec_load_purgatory()
Dmodule.c2646 if (memcmp(info->hdr->e_ident, ELFMAG, SELFMAG) != 0 in elf_header_check()
/linux-4.4.14/tools/lib/bpf/
Dlibbpf.c418 switch (obj->efile.ehdr.e_ident[EI_DATA]) { in bpf_object__check_endianness()
/linux-4.4.14/tools/lguest/
Dlguest.c530 if (memcmp(hdr.e_ident, ELFMAG, SELFMAG) == 0) in load_kernel()