Home
last modified time | relevance | path

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

123

/Linux-v4.19/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.h56 unsigned char e_ident[EI_NIDENT]; member
73 unsigned char e_ident[16]; /* ELF "magic number" */ member
/Linux-v4.19/tools/perf/util/
Dsymbol-minimal.c89 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/
Dkexec_elf_64.c56 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/
Drelocs_main.c35 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()
Drelocs.c163 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/
Drelocs_common.c26 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/
Dsortextable.c274 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()
Dinsert-sys-cert.c323 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()
Drecordmcount.c459 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/
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-v4.19/drivers/remoteproc/
Dremoteproc_elf_loader.c62 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/
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-v4.19/arch/s390/include/asm/
Delf.h152 && (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/
Dmisc.c282 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/
Dvmcore.c1175 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/
Delf.h247 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/
Delf.h289 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/
Delf.c92 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/
Dbootloader.c115 if (elf->e_ident[0] == 0x7f && strncmp(elf->e_ident + 1, "ELF", 3) != 0) { in start_bootloader()
/Linux-v4.19/arch/s390/kernel/
Dkexec_elf.c77 ehdr->e_ident[EI_CLASS] != ELFCLASS64 || in s390_elf_load()
138 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) in s390_elf_probe()
Dcrash_dump.c513 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/
Dvdso2c.c154 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/
Dvdso2c.c181 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/
Dobjstrip.c151 if (elf->e_ident[0] == 0x7f && strncmp((char *)elf->e_ident + 1, "ELF", 3) == 0) { in main()

123