/external/elfutils/libelf/ |
D | elf_begin.c | 74 get_shnum (void *map_address, unsigned char *e_ident, int fildes, off_t offset, in get_shnum() argument 89 bool is32 = e_ident[EI_CLASS] == ELFCLASS32; in get_shnum() 92 if (e_ident[EI_DATA] == MY_ELFDATA in get_shnum() 94 || (((size_t) e_ident in get_shnum() 97 ehdr.p = e_ident; in get_shnum() 109 ehdr_mem.e32.e_shnum = ((Elf32_Ehdr *) e_ident)->e_shnum; in get_shnum() 110 ehdr_mem.e32.e_shoff = ((Elf32_Ehdr *) e_ident)->e_shoff; in get_shnum() 113 memcpy (&ehdr_mem, e_ident, sizeof (Elf32_Ehdr)); in get_shnum() 115 if (e_ident[EI_DATA] != MY_ELFDATA) in get_shnum() 125 ehdr_mem.e64.e_shnum = ((Elf64_Ehdr *) e_ident)->e_shnum; in get_shnum() [all …]
|
D | elf32_updatenull.c | 55 if (memcmp (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG) != 0) in ELFW() 57 memcpy (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG); in ELFW() 62 update_if_changed (ehdr->e_ident[EI_CLASS], ELFW(ELFCLASS,LIBELFBITS), in ELFW() 66 if (unlikely (ehdr->e_ident[EI_DATA] == ELFDATANONE)) in ELFW() 68 ehdr->e_ident[EI_DATA] = in ELFW() 72 else if (unlikely (ehdr->e_ident[EI_DATA] >= ELFDATANUM)) in ELFW() 79 && ehdr->e_ident[EI_DATA] != ELFDATA2LSB) in ELFW() 81 && ehdr->e_ident[EI_DATA] != ELFDATA2MSB)); in ELFW() 84 update_if_changed (ehdr->e_ident[EI_VERSION], EV_CURRENT, in ELFW()
|
D | elf_getshdrstrndx.c | 110 && elf->state.elf32.ehdr->e_ident[EI_DATA] == MY_ELFDATA in elf_getshdrstrndx() 151 if (elf->state.elf32.ehdr->e_ident[EI_DATA] != MY_ELFDATA) in elf_getshdrstrndx() 175 && elf->state.elf64.ehdr->e_ident[EI_DATA] == MY_ELFDATA in elf_getshdrstrndx() 216 if (elf->state.elf64.ehdr->e_ident[EI_DATA] != MY_ELFDATA) in elf_getshdrstrndx()
|
/external/elfutils/tests/ |
D | update1.c | 69 printf (" %02x", ehdr->e_ident[i]); in main() 80 ehdr->e_ident[0] = 42; in main() 81 ehdr->e_ident[4] = 1; in main() 82 ehdr->e_ident[5] = 1; in main() 83 ehdr->e_ident[6] = 2; in main() 84 ehdr->e_ident[9] = 2; in main() 107 printf (" %02x", ehdr->e_ident[i]); in main()
|
D | update2.c | 70 printf (" %02x", ehdr->e_ident[i]); in main() 81 ehdr->e_ident[0] = 42; in main() 82 ehdr->e_ident[4] = 1; in main() 83 ehdr->e_ident[5] = 1; in main() 84 ehdr->e_ident[6] = 2; in main() 130 printf (" %02x", ehdr->e_ident[i]); in main()
|
D | update3.c | 79 printf (" %02x", ehdr->e_ident[i]); in main() 90 ehdr->e_ident[0] = 42; in main() 91 ehdr->e_ident[4] = 1; in main() 92 ehdr->e_ident[5] = 1; in main() 93 ehdr->e_ident[6] = 2; in main() 185 printf (" %02x", ehdr->e_ident[i]); in main()
|
D | update4.c | 83 printf (" %02x", ehdr->e_ident[i]); in main() 94 ehdr->e_ident[0] = 42; in main() 95 ehdr->e_ident[4] = 1; in main() 96 ehdr->e_ident[5] = 1; in main() 97 ehdr->e_ident[6] = 2; in main() 337 printf (" %02x", ehdr->e_ident[i]); in main()
|
/external/libunwind/src/ |
D | elfxx.h | 97 uint8_t* e_ident = (uint8_t*) ei->u.mapped.image; in elf_w() local 99 && e_ident[EI_CLASS] == ELF_CLASS && e_ident[EI_VERSION] != EV_NONE in elf_w() 100 && e_ident[EI_VERSION] <= EV_CURRENT); in elf_w() 104 uint8_t e_ident[EI_NIDENT]; in elf_w() local 106 if (SELFMAG != elf_w (memory_read) (ei, start, e_ident, SELFMAG, false)) { in elf_w() 109 if (memcmp (e_ident, ELFMAG, SELFMAG) != 0) { in elf_w() 114 ei, start + SELFMAG, e_ident + SELFMAG, EI_NIDENT - SELFMAG, false)) { in elf_w() 117 return e_ident[EI_CLASS] == ELF_CLASS && e_ident[EI_VERSION] != EV_NONE in elf_w() 118 && e_ident[EI_VERSION] <= EV_CURRENT; in elf_w()
|
/external/elfutils/libdw/ |
D | encoded-value.h | 41 encoded_value_size (const Elf_Data *data, const unsigned char e_ident[], in encoded_value_size() argument 57 return e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8; in encoded_value_size() 80 width = width ?: cache->e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8; in __libdw_cfi_read_address_inc() 90 Dwarf eh_dbg = { .other_byte_order = MY_ELFDATA != cache->e_ident[EI_DATA] }; in __libdw_cfi_read_address_inc() 139 cache->e_ident, in read_encoded_value() 218 size_t ptrsize = encoded_value_size (NULL, cache->e_ident, in read_encoded_value()
|
D | dwarf_getcfi_elf.c | 53 cfi->e_ident = (unsigned char *) elf_getident (elf, NULL); in allocate_cfi() 54 if (cfi->e_ident == NULL) in allocate_cfi() 61 if ((BYTE_ORDER == LITTLE_ENDIAN && cfi->e_ident[EI_DATA] == ELFDATA2MSB) in allocate_cfi() 62 || (BYTE_ORDER == BIG_ENDIAN && cfi->e_ident[EI_DATA] == ELFDATA2LSB)) in allocate_cfi() 96 .e_ident = ehdr->e_ident, in parse_eh_frame_hdr() 150 vsize = encoded_value_size (data, ehdr->e_ident, search_table_encoding, in getcfi_gnu_eh_frame() 246 vsize = encoded_value_size (hdr_data, ehdr->e_ident, in getcfi_scn_eh_frame()
|
D | dwarf_next_cfi.c | 40 dwarf_next_cfi (const unsigned char e_ident[], in dwarf_next_cfi() argument 48 BYTE_ORDER_DUMMY (dw, e_ident); in dwarf_next_cfi() 145 uint_fast8_t address_size = e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8; in dwarf_next_cfi() 223 += encoded_value_size (data, e_ident, encoding, NULL); in dwarf_next_cfi() 227 bytes += encoded_value_size (data, e_ident, encoding, bytes); in dwarf_next_cfi()
|
D | cfi.h | 83 const unsigned char *e_ident; /* For EI_DATA and EI_CLASS. */ member 224 #define BYTE_ORDER_DUMMY(var, e_ident) \ argument 226 { ((BYTE_ORDER == LITTLE_ENDIAN && e_ident[EI_DATA] == ELFDATA2MSB) \ 227 || (BYTE_ORDER == BIG_ENDIAN && e_ident[EI_DATA] == ELFDATA2LSB)) }
|
D | cie.c | 94 += encoded_value_size (&cache->data->d, cache->e_ident, in intern_new_cie() 104 data += encoded_value_size (&cache->data->d, cache->e_ident, in intern_new_cie() 125 = cache->e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8; in intern_new_cie() 170 int result = INTUSE(dwarf_next_cfi) (cache->e_ident, in __libdw_find_cie()
|
D | fde.c | 147 int result = INTUSE(dwarf_next_cfi) (cache->e_ident, in __libdw_fde_by_offset() 177 const size_t size = 2 * encoded_value_size (&cache->data->d, cache->e_ident, in binary_search_fde() 192 .e_ident = cache->e_ident, in binary_search_fde() 283 int result = INTUSE(dwarf_next_cfi) (cache->e_ident, in __libdw_find_fde()
|
/external/u-boot/drivers/net/pfe_eth/ |
D | pfe_firmware.c | 44 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()
|
/external/google-breakpad/src/common/linux/ |
D | elf_core_dump.cc | 111 header->e_ident[0] == ELFMAG0 && in IsValid() 112 header->e_ident[1] == ELFMAG1 && in IsValid() 113 header->e_ident[2] == ELFMAG2 && in IsValid() 114 header->e_ident[3] == ELFMAG3 && in IsValid() 115 header->e_ident[4] == kClass && in IsValid()
|
D | elf_core_dump_unittest.cc | 87 header.e_ident[0] = ELFMAG0; in TEST() 93 header.e_ident[1] = ELFMAG1; in TEST() 99 header.e_ident[2] = ELFMAG2; in TEST() 105 header.e_ident[3] = ELFMAG3; in TEST() 111 header.e_ident[4] = ElfCoreDump::kClass; in TEST()
|
/external/elfutils/libdwfl/ |
D | elf-from-memory.c | 200 bool class32 = ehdr.e32.e_ident[EI_CLASS] == ELFCLASS32; in elf_from_remote_memory() 226 switch (ehdr.e32.e_ident[EI_CLASS]) in elf_from_remote_memory() 258 ehdr.e32.e_ident[EI_DATA]) == NULL) in elf_from_remote_memory() 269 ehdr.e64.e_ident[EI_DATA]) == NULL) in elf_from_remote_memory() 308 switch (ehdr.e32.e_ident[EI_CLASS]) in elf_from_remote_memory() 348 ehdr.e32.e_ident[EI_DATA]) == NULL) in elf_from_remote_memory() 375 ehdr.e64.e_ident[EI_DATA]) == NULL) in elf_from_remote_memory()
|
/external/u-boot/tools/ |
D | prelink-riscv.c | 88 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()
|
D | img2srec.c | 252 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()
|
/external/google-breakpad/src/common/solaris/ |
D | file_id.cc | 89 if (elf_header.e_ident[EI_MAG0] != ELFMAG0 || in FindElfTextSection() 90 elf_header.e_ident[EI_MAG1] != ELFMAG1 || in FindElfTextSection() 91 elf_header.e_ident[EI_MAG2] != ELFMAG2 || in FindElfTextSection() 92 elf_header.e_ident[EI_MAG3] != ELFMAG3) { in FindElfTextSection()
|
/external/u-boot/include/ |
D | elf.h | 85 #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
|
/external/swiftshader/third_party/LLVM/include/llvm/Support/ |
D | ELF.h | 63 unsigned char e_ident[EI_NIDENT]; // ELF Identification bytes member 78 return (memcmp(e_ident, ElfMagic, strlen(ElfMagic))) == 0; in checkMagic() 80 unsigned char getFileClass() const { return e_ident[EI_CLASS]; } in getFileClass() 81 unsigned char getDataEncoding() const { return e_ident[EI_DATA]; } in getDataEncoding() 87 unsigned char e_ident[EI_NIDENT]; member 102 return (memcmp(e_ident, ElfMagic, strlen(ElfMagic))) == 0; in checkMagic() 104 unsigned char getFileClass() const { return e_ident[EI_CLASS]; } in getFileClass() 105 unsigned char getDataEncoding() const { return e_ident[EI_DATA]; } in getDataEncoding()
|
/external/icu/icu4c/source/tools/toolutil/ |
D | pkg_genc.cpp | 724 buffer.header32.e_ident[0]!=ELFMAG0 || in getArchitecture() 725 buffer.header32.e_ident[1]!=ELFMAG1 || in getArchitecture() 726 buffer.header32.e_ident[2]!=ELFMAG2 || in getArchitecture() 727 buffer.header32.e_ident[3]!=ELFMAG3 || in getArchitecture() 728 buffer.header32.e_ident[EI_CLASS]<ELFCLASS32 || buffer.header32.e_ident[EI_CLASS]>ELFCLASS64 in getArchitecture() 734 …*pBits= buffer.header32.e_ident[EI_CLASS]==ELFCLASS32 ? 32 : 64; /* only 32 or 64: see check above… in getArchitecture() 747 *pIsBigEndian=(UBool)(buffer.header32.e_ident[EI_DATA]==ELFDATA2MSB); in getArchitecture() 1088 header32.e_ident[EI_DATA]= makeBigEndian ? ELFDATA2MSB : ELFDATA2LSB; in writeObjectCode() 1108 header64.e_ident[EI_DATA]= makeBigEndian ? ELFDATA2MSB : ELFDATA2LSB; in writeObjectCode()
|
/external/elfutils/libasm/ |
D | asm_begin.c | 103 ehdr->e_ident[EI_CLASS] = class; in prepare_binary_output() 104 ehdr->e_ident[EI_DATA] = ebl_get_elfdata (ebl); in prepare_binary_output() 106 memcpy (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG); in prepare_binary_output()
|