Home
last modified time | relevance | path

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

1234

/openbmc/linux/arch/powerpc/boot/
H A 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 …]
/openbmc/linux/tools/perf/util/
H A Dsymbol-minimal.c94 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 …]
/openbmc/linux/kernel/
H A 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 …]
/openbmc/linux/drivers/remoteproc/
H A Dremoteproc_elf_helpers.h27 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()
/openbmc/linux/arch/mips/tools/
H A Delf-entry.c58 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 Dloongson3-llsc-check.c270 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()
/openbmc/u-boot/drivers/net/pfe_eth/
H A Dpfe_firmware.c44 if (strncmp((char *)&elf_hdr->e_ident[EI_MAG0], ELFMAG, SELFMAG)) { in pfe_load_elf()
49 if (elf_hdr->e_ident[EI_CLASS] != ELFCLASS32) { in pfe_load_elf()
51 elf_hdr->e_ident[EI_CLASS]); in pfe_load_elf()
55 if (elf_hdr->e_ident[EI_DATA] != ELFDATA2MSB) { in pfe_load_elf()
57 elf_hdr->e_ident[EI_DATA]); in pfe_load_elf()
/openbmc/linux/tools/testing/selftests/proc/
H A Dproc-pid-vm.c81 uint8_t e_ident[16]; member
164 h.e_ident[0] = 0x7f; in make_exe()
165 h.e_ident[1] = 'E'; in make_exe()
166 h.e_ident[2] = 'L'; in make_exe()
167 h.e_ident[3] = 'F'; in make_exe()
168 h.e_ident[4] = 2; in make_exe()
169 h.e_ident[5] = 1; in make_exe()
170 h.e_ident[6] = 1; in make_exe()
171 h.e_ident[7] = 0; in make_exe()
/openbmc/u-boot/tools/
H A Dprelink-riscv.c88 unsigned char *e_ident = (unsigned char *)data; in main() local
90 if (memcmp(e_ident, ELFMAG, SELFMAG) != 0) in main()
93 bool is64 = e_ident[EI_CLASS] == ELFCLASS64; in main()
H A Dimg2srec.c252 getPtr = ExtractBlock(sizeof elfHeader.e_ident, elfHeader.e_ident, rxBlock); in ConvertELF()
267 || (elfHeader.e_ident[0] != ELFMAG0) in ConvertELF()
268 || (elfHeader.e_ident[1] != ELFMAG1) in ConvertELF()
269 || (elfHeader.e_ident[2] != ELFMAG2) in ConvertELF()
270 || (elfHeader.e_ident[3] != ELFMAG3) in ConvertELF()
/openbmc/linux/arch/mips/boot/tools/
H A 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()
H A 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()
/openbmc/linux/scripts/
H A Dsorttable.c274 switch (ehdr->e_ident[EI_DATA]) { in do_file()
293 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()
331 switch (ehdr->e_ident[EI_CLASS]) { in do_file()
356 ehdr->e_ident[EI_CLASS], fname); in do_file()
H A 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()
H A Drecordmcount.c524 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()
611 switch (ehdr->e_ident[EI_CLASS]) { in do_file()
614 ehdr->e_ident[EI_CLASS], fname); in do_file()
/openbmc/linux/arch/x86/tools/
H A 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()
/openbmc/linux/arch/arm64/kvm/hyp/nvhe/
H A Dgen-hyprel.c280 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()
/openbmc/qemu/contrib/elf2dmp/
H A Dqemu_elf.c142 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG)) { in check_ehdr()
147 if (ehdr->e_ident[EI_CLASS] != ELFCLASS64 || in check_ehdr()
148 ehdr->e_ident[EI_DATA] != ELFDATA2LSB) { in check_ehdr()
153 if (ehdr->e_ident[EI_VERSION] != EV_CURRENT) { in check_ehdr()
/openbmc/u-boot/include/
H A Delf.h85 #define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \
86 (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \
87 (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \
88 (ehdr).e_ident[EI_MAG3] == ELFMAG3)
92 unsigned char e_ident[EI_NIDENT]; /* ELF Identification */ member
110 unsigned char e_ident[EI_NIDENT]; /* ELF Identification */ member
/openbmc/linux/arch/parisc/boot/compressed/
H A 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()
/openbmc/linux/arch/mips/vdso/
H A Dgenvdso.c141 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()
/openbmc/linux/arch/arm/vdso/
H A 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()
/openbmc/qemu/hw/core/
H A Dloader.c356 uint8_t *e_ident; in load_elf_hdr() local
363 e_ident = hdr; in load_elf_hdr()
374 if (e_ident[0] != ELFMAG0 || in load_elf_hdr()
375 e_ident[1] != ELFMAG1 || in load_elf_hdr()
376 e_ident[2] != ELFMAG2 || in load_elf_hdr()
377 e_ident[3] != ELFMAG3) { in load_elf_hdr()
382 is64l = e_ident[EI_CLASS] == ELFCLASS64; in load_elf_hdr()
462 uint8_t e_ident[EI_NIDENT]; in load_elf_ram_sym() local
469 if (read(fd, e_ident, sizeof(e_ident)) != sizeof(e_ident)) in load_elf_ram_sym()
471 if (e_ident[0] != ELFMAG0 || in load_elf_ram_sym()
[all …]
/openbmc/linux/fs/proc/
H A Dvmcore.c1227 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 …]
/openbmc/linux/arch/s390/include/asm/
H A Delf.h180 && (x)->e_ident[EI_CLASS] == ELF_CLASS)
183 && (x)->e_ident[EI_CLASS] == ELF_CLASS)
264 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) { \

1234