Searched refs:e_ident (Results 1 - 25 of 68) sorted by relevance

123

/linux-master/arch/powerpc/boot/
H A Delf_util.c20 if (!(elf64->e_ident[EI_MAG0] == ELFMAG0 &&
21 elf64->e_ident[EI_MAG1] == ELFMAG1 &&
22 elf64->e_ident[EI_MAG2] == ELFMAG2 &&
23 elf64->e_ident[EI_MAG3] == ELFMAG3 &&
24 elf64->e_ident[EI_CLASS] == ELFCLASS64 &&
26 elf64->e_ident[EI_DATA] == ELFDATA2LSB &&
28 elf64->e_ident[EI_DATA] == ELFDATA2MSB &&
56 if (!(elf32->e_ident[EI_MAG0] == ELFMAG0 &&
57 elf32->e_ident[EI_MAG1] == ELFMAG1 &&
58 elf32->e_ident[EI_MAG
[all...]
H A Delf.h56 unsigned char e_ident[EI_NIDENT]; member in struct:elf32_hdr
73 unsigned char e_ident[16]; /* ELF "magic number" */ member in struct:elf64_hdr
117 #define EI_MAG0 0 /* e_ident[] indexes */
139 #define ELFDATANONE 0 /* e_ident[EI_DATA] */
H A Dof.c53 if (elf64->e_ident[EI_CLASS] == ELFCLASS64) {
/linux-master/arch/mips/tools/
H A Delf-entry.c58 if (memcmp(hdr.ehdr32.e_ident, ELFMAG, SELFMAG)) {
63 switch (hdr.ehdr32.e_ident[EI_CLASS]) {
65 switch (hdr.ehdr32.e_ident[EI_DATA]) {
82 switch (hdr.ehdr32.e_ident[EI_DATA]) {
/linux-master/arch/x86/tools/
H A Drelocs_common.c26 unsigned char e_ident[EI_NIDENT]; local
71 if (fread(&e_ident, 1, EI_NIDENT, fp) != EI_NIDENT) {
75 if (e_ident[EI_CLASS] == ELFCLASS64)
/linux-master/arch/mips/boot/tools/
H A Drelocs_main.c35 unsigned char e_ident[EI_NIDENT]; local
75 if (fread(&e_ident, 1, EI_NIDENT, fp) != EI_NIDENT)
79 if (e_ident[EI_CLASS] == ELFCLASS64)
H A Drelocs.c163 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB)
171 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB)
179 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB)
191 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB)
210 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0)
213 if (ehdr.e_ident[EI_CLASS] != ELF_CLASS)
216 if ((ehdr.e_ident[EI_DATA] != ELFDATA2LSB) &&
217 (ehdr.e_ident[EI_DATA] != ELFDATA2MSB))
220 if (ehdr.e_ident[EI_VERSION] != EV_CURRENT)
/linux-master/tools/perf/util/
H A Dsymbol-minimal.c94 u8 e_ident[EI_NIDENT]; local
103 if (fread(e_ident, sizeof(e_ident), 1, fp) != 1)
106 if (memcmp(e_ident, ELFMAG, SELFMAG) ||
107 e_ident[EI_VERSION] != EV_CURRENT)
110 need_swap = check_need_swap(e_ident[EI_DATA]);
115 if (e_ident[EI_CLASS] == ELFCLASS32) {
305 u8 e_ident[EI_NIDENT]; local
310 if (readn(fd, e_ident, sizeof(e_ident)) !
[all...]
/linux-master/drivers/remoteproc/
H A Dremoteproc_elf_helpers.h27 return ehdr->e_ident[EI_CLASS];
32 memcpy(hdr->e_ident, ELFMAG, SELFMAG);
33 hdr->e_ident[EI_CLASS] = class;
34 hdr->e_ident[EI_DATA] = ELFDATA2LSB;
35 hdr->e_ident[EI_VERSION] = EV_CURRENT;
36 hdr->e_ident[EI_OSABI] = ELFOSABI_NONE;
H A Dremoteproc_elf_loader.c64 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-master/tools/objtool/include/objtool/
H A Dendianness.h18 (elf->ehdr.e_ident[EI_DATA] == ELFDATA2LSB);
/linux-master/kernel/
H A Dkexec_elf.c26 return memcmp(ehdr->e_ident, ELFMAG, SELFMAG) == 0;
31 if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
33 else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
41 if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
43 else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
51 if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
53 else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
72 } else if (ehdr->e_ident[EI_VERSION] != EV_CURRENT ||
129 memcpy(ehdr->e_ident, buf, sizeof(ehdr->e_ident));
[all...]
H A Dcrash_core.c192 memcpy(ehdr->e_ident, ELFMAG, SELFMAG);
193 ehdr->e_ident[EI_CLASS] = ELFCLASS64;
194 ehdr->e_ident[EI_DATA] = ELFDATA2LSB;
195 ehdr->e_ident[EI_VERSION] = EV_CURRENT;
196 ehdr->e_ident[EI_OSABI] = ELF_OSABI;
197 memset(ehdr->e_ident + EI_PAD, 0, EI_NIDENT - EI_PAD);
/linux-master/scripts/
H A Dsorttable.c274 switch (ehdr->e_ident[EI_DATA]) {
293 ehdr->e_ident[EI_DATA], fname);
297 if (memcmp(ELFMAG, ehdr->e_ident, SELFMAG) != 0 ||
299 ehdr->e_ident[EI_VERSION] != EV_CURRENT) {
331 switch (ehdr->e_ident[EI_CLASS]) {
356 ehdr->e_ident[EI_CLASS], fname);
H A Dinsert-sys-cert.c323 if ((hdr->e_ident[EI_MAG0] != ELFMAG0) ||
324 (hdr->e_ident[EI_MAG1] != ELFMAG1) ||
325 (hdr->e_ident[EI_MAG2] != ELFMAG2) ||
326 (hdr->e_ident[EI_MAG3] != ELFMAG3)) {
331 if (hdr->e_ident[EI_CLASS] != CURRENT_ELFCLASS) {
336 if (hdr->e_ident[EI_DATA] != endianness()) {
/linux-master/tools/testing/selftests/proc/
H A Dproc-pid-vm.c81 uint8_t e_ident[16]; member in struct:elf64_hdr
164 h.e_ident[0] = 0x7f;
165 h.e_ident[1] = 'E';
166 h.e_ident[2] = 'L';
167 h.e_ident[3] = 'F';
168 h.e_ident[4] = 2;
169 h.e_ident[5] = 1;
170 h.e_ident[6] = 1;
171 h.e_ident[7] = 0;
/linux-master/arch/arm/vdso/
H A Dvdsomunge.c153 if (memcmp(&inhdr->e_ident, ELFMAG, SELFMAG) != 0)
156 if (inhdr->e_ident[EI_CLASS] != ELFCLASS32)
159 swap = inhdr->e_ident[EI_DATA] != HOST_ORDER;
/linux-master/lib/
H A Dbuildid.c147 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0)
154 if (ehdr->e_ident[EI_CLASS] == ELFCLASS32)
156 else if (ehdr->e_ident[EI_CLASS] == ELFCLASS64)
/linux-master/arch/arm64/kvm/hyp/nvhe/
H A Dgen-hyprel.c280 assert_eq(elf.ehdr->e_ident[EI_MAG0], ELFMAG0, "0x%x");
281 assert_eq(elf.ehdr->e_ident[EI_MAG1], ELFMAG1, "0x%x");
282 assert_eq(elf.ehdr->e_ident[EI_MAG2], ELFMAG2, "0x%x");
283 assert_eq(elf.ehdr->e_ident[EI_MAG3], ELFMAG3, "0x%x");
286 assert_eq(elf.ehdr->e_ident[EI_CLASS], ELFCLASS64, "%u");
287 assert_eq(elf.ehdr->e_ident[EI_DATA], ELFENDIAN, "%u");
/linux-master/arch/s390/tools/
H A Drelocs.c82 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB)
90 if (ehdr.e_ident[EI_DATA] == ELFDATA2LSB)
122 if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0)
124 if (ehdr.e_ident[EI_CLASS] != ELF_CLASS)
126 if (ehdr.e_ident[EI_DATA] != ELF_ENDIAN)
128 if (ehdr.e_ident[EI_VERSION] != EV_CURRENT)
363 unsigned char e_ident[EI_NIDENT]; local
378 if (fread(&e_ident, 1, EI_NIDENT, fp) != EI_NIDENT)
/linux-master/arch/riscv/include/asm/
H A Delf.h38 ((x)->e_ident[EI_CLASS] == ELF_CLASS))
138 do { set_compat_task((ex).e_ident[EI_CLASS] == ELFCLASS32); \
/linux-master/arch/mips/vdso/
H A Dgenvdso.c141 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0) {
148 elf_class = ehdr->e_ident[EI_CLASS];
160 switch (ehdr->e_ident[EI_DATA]) {
163 need_swap = ehdr->e_ident[EI_DATA] != HOST_ORDER;
/linux-master/arch/parisc/boot/compressed/
H A Dmisc.c246 if (ehdr.e_ident[EI_MAG0] != ELFMAG0 ||
247 ehdr.e_ident[EI_MAG1] != ELFMAG1 ||
248 ehdr.e_ident[EI_MAG2] != ELFMAG2 ||
249 ehdr.e_ident[EI_MAG3] != ELFMAG3) {
/linux-master/arch/s390/kernel/
H A Dkexec_elf.c82 ehdr->e_ident[EI_CLASS] != ELFCLASS64 ||
126 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) != 0)
/linux-master/arch/x86/boot/compressed/
H A Dmisc.c307 if (ehdr.e_ident[EI_MAG0] != ELFMAG0 ||
308 ehdr.e_ident[EI_MAG1] != ELFMAG1 ||
309 ehdr.e_ident[EI_MAG2] != ELFMAG2 ||
310 ehdr.e_ident[EI_MAG3] != ELFMAG3)

Completed in 330 milliseconds

123