Home
last modified time | relevance | path

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

123

/Linux-v5.4/arch/powerpc/boot/
Delf_util.c20 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 …]
Delf.h56 unsigned char e_ident[EI_NIDENT]; member
73 unsigned char e_ident[16]; /* ELF "magic number" */ member
/Linux-v5.4/tools/perf/util/
Dsymbol-minimal.c92 u8 e_ident[EI_NIDENT]; in filename__read_build_id() local
101 if (fread(e_ident, sizeof(e_ident), 1, fp) != 1) in filename__read_build_id()
104 if (memcmp(e_ident, ELFMAG, SELFMAG) || in filename__read_build_id()
105 e_ident[EI_VERSION] != EV_CURRENT) in filename__read_build_id()
108 need_swap = check_need_swap(e_ident[EI_DATA]); in filename__read_build_id()
113 if (e_ident[EI_CLASS] == ELFCLASS32) { in filename__read_build_id()
301 u8 e_ident[EI_NIDENT]; in fd__is_64_bit() local
306 if (readn(fd, e_ident, sizeof(e_ident)) != sizeof(e_ident)) in fd__is_64_bit()
309 if (memcmp(e_ident, ELFMAG, SELFMAG) || in fd__is_64_bit()
310 e_ident[EI_VERSION] != EV_CURRENT) in fd__is_64_bit()
[all …]
/Linux-v5.4/kernel/
Dkexec_elf.c26 return memcmp(ehdr->e_ident, ELFMAG, SELFMAG) == 0; in elf_is_elf_file()
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()
72 } else if (ehdr->e_ident[EI_VERSION] != EV_CURRENT || in elf_is_ehdr_sane()
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()
[all …]
/Linux-v5.4/arch/mips/tools/
Delf-entry.c57 if (memcmp(hdr.ehdr32.e_ident, ELFMAG, SELFMAG)) in main()
60 switch (hdr.ehdr32.e_ident[EI_CLASS]) { in main()
62 switch (hdr.ehdr32.e_ident[EI_DATA]) { in main()
78 switch (hdr.ehdr32.e_ident[EI_DATA]) { in main()
/Linux-v5.4/tools/testing/selftests/proc/
Dproc-pid-vm.c79 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-v5.4/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-v5.4/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-v5.4/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.c467 switch (ehdr->e_ident[EI_DATA]) { in do_file()
471 ehdr->e_ident[EI_DATA], fname); in do_file()
500 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 || in do_file()
502 ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in do_file()
551 switch (ehdr->e_ident[EI_CLASS]) { in do_file()
554 ehdr->e_ident[EI_CLASS], fname); in do_file()
/Linux-v5.4/arch/mips/vdso/
Dgenvdso.c139 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) { in map_vdso()
145 elf_class = ehdr->e_ident[EI_CLASS]; in map_vdso()
156 switch (ehdr->e_ident[EI_DATA]) { in map_vdso()
159 need_swap = ehdr->e_ident[EI_DATA] != HOST_ORDER; in map_vdso()
/Linux-v5.4/drivers/remoteproc/
Dremoteproc_elf_loader.c54 class = ehdr->e_ident[EI_CLASS];
62 if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB) {
64 if (ehdr->e_ident[EI_DATA] != ELFDATA2MSB) {
75 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG)) {
/Linux-v5.4/arch/parisc/boot/compressed/
Dmisc.c246 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-v5.4/arch/s390/include/asm/
Delf.h156 && (x)->e_ident[EI_CLASS] == ELF_CLASS)
159 && (x)->e_ident[EI_CLASS] == ELF_CLASS)
245 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) { \
/Linux-v5.4/arch/arm/vdso/
Dvdsomunge.c153 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-v5.4/arch/x86/boot/compressed/
Dmisc.c283 if (ehdr.e_ident[EI_MAG0] != ELFMAG0 || in parse_elf()
284 ehdr.e_ident[EI_MAG1] != ELFMAG1 || in parse_elf()
285 ehdr.e_ident[EI_MAG2] != ELFMAG2 || in parse_elf()
286 ehdr.e_ident[EI_MAG3] != ELFMAG3) { in parse_elf()
/Linux-v5.4/fs/proc/
Dvmcore.c1202 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 || in parse_crash_elf64_headers()
1205 ehdr.e_ident[EI_CLASS] != ELFCLASS64 || in parse_crash_elf64_headers()
1206 ehdr.e_ident[EI_VERSION] != EV_CURRENT || in parse_crash_elf64_headers()
1258 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0 || in parse_crash_elf32_headers()
1261 ehdr.e_ident[EI_CLASS] != ELFCLASS32|| in parse_crash_elf32_headers()
1262 ehdr.e_ident[EI_VERSION] != EV_CURRENT || in parse_crash_elf32_headers()
1301 unsigned char e_ident[EI_NIDENT]; in parse_crash_elf_headers() local
1306 rc = elfcorehdr_read(e_ident, EI_NIDENT, &addr); in parse_crash_elf_headers()
1309 if (memcmp(e_ident, ELFMAG, SELFMAG) != 0) { in parse_crash_elf_headers()
1314 if (e_ident[EI_CLASS] == ELFCLASS64) { in parse_crash_elf_headers()
[all …]
/Linux-v5.4/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-v5.4/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-v5.4/arch/powerpc/platforms/powernv/
Dopal-core.c356 memcpy(elf->e_ident, ELFMAG, SELFMAG); in create_opalcore()
357 elf->e_ident[EI_CLASS] = ELF_CLASS; in create_opalcore()
358 elf->e_ident[EI_DATA] = ELFDATA2MSB; in create_opalcore()
359 elf->e_ident[EI_VERSION] = EV_CURRENT; in create_opalcore()
360 elf->e_ident[EI_OSABI] = ELF_OSABI; in create_opalcore()
361 memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD); in create_opalcore()
/Linux-v5.4/arch/mips/kernel/
Delf.c90 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()
/Linux-v5.4/arch/s390/kernel/
Dkexec_elf.c80 ehdr->e_ident[EI_CLASS] != ELFCLASS64 || in s390_elf_load()
124 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) in s390_elf_probe()
/Linux-v5.4/arch/x86/entry/vdso/
Dvdso2c.c170 if (hdr->e_ident[EI_CLASS] == ELFCLASS64) { in go()
173 } else if (hdr->e_ident[EI_CLASS] == ELFCLASS32) { in go()

123