/third_party/elfio/elfio/ |
D | elfio_header.hpp | 83 header.e_ident[EI_MAG0] = ELFMAG0; in elf_header_impl() 84 header.e_ident[EI_MAG1] = ELFMAG1; in elf_header_impl() 85 header.e_ident[EI_MAG2] = ELFMAG2; in elf_header_impl() 86 header.e_ident[EI_MAG3] = ELFMAG3; in elf_header_impl() 87 header.e_ident[EI_CLASS] = elf_header_impl_types<T>::file_class; in elf_header_impl() 88 header.e_ident[EI_DATA] = encoding; in elf_header_impl() 89 header.e_ident[EI_VERSION] = EV_CURRENT; in elf_header_impl() 123 ELFIO_GET_ACCESS( unsigned char, class, header.e_ident[EI_CLASS] ); 124 ELFIO_GET_ACCESS( unsigned char, elf_version, header.e_ident[EI_VERSION] ); 125 ELFIO_GET_ACCESS( unsigned char, encoding, header.e_ident[EI_DATA] ); [all …]
|
D | elfio.hpp | 165 std::array<char, EI_NIDENT> e_ident = { 0 }; in load() local 168 stream.read( e_ident.data(), sizeof( e_ident ) ); in load() 171 if ( stream.gcount() != sizeof( e_ident ) || in load() 172 e_ident[EI_MAG0] != ELFMAG0 || e_ident[EI_MAG1] != ELFMAG1 || in load() 173 e_ident[EI_MAG2] != ELFMAG2 || e_ident[EI_MAG3] != ELFMAG3 ) { in load() 177 if ( ( e_ident[EI_CLASS] != ELFCLASS64 ) && in load() 178 ( e_ident[EI_CLASS] != ELFCLASS32 ) ) { in load() 182 if ( ( e_ident[EI_DATA] != ELFDATA2LSB ) && in load() 183 ( e_ident[EI_DATA] != ELFDATA2MSB ) ) { in load() 187 convertor.setup( e_ident[EI_DATA] ); in load() [all …]
|
/third_party/elfutils/libelf/ |
D | elf_begin.c | 72 get_shnum (void *map_address, unsigned char *e_ident, int fildes, in get_shnum() argument 87 bool is32 = e_ident[EI_CLASS] == ELFCLASS32; in get_shnum() 97 if (e_ident[EI_DATA] == MY_ELFDATA in get_shnum() 99 || (((size_t) e_ident in get_shnum() 102 ehdr.p = e_ident; in get_shnum() 114 ehdr_mem.e32.e_shnum = ((Elf32_Ehdr *) e_ident)->e_shnum; in get_shnum() 115 ehdr_mem.e32.e_shoff = ((Elf32_Ehdr *) e_ident)->e_shoff; in get_shnum() 118 memcpy (&ehdr_mem, e_ident, sizeof (Elf32_Ehdr)); in get_shnum() 120 if (e_ident[EI_DATA] != MY_ELFDATA) in get_shnum() 130 ehdr_mem.e64.e_shnum = ((Elf64_Ehdr *) e_ident)->e_shnum; in get_shnum() [all …]
|
D | elf32_updatenull.c | 57 if (memcmp (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG) != 0) in ELFW() 59 memcpy (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG); in ELFW() 64 update_if_changed (ehdr->e_ident[EI_CLASS], ELFW(ELFCLASS,LIBELFBITS), in ELFW() 68 if (unlikely (ehdr->e_ident[EI_DATA] == ELFDATANONE)) in ELFW() 70 ehdr->e_ident[EI_DATA] = in ELFW() 74 else if (unlikely (ehdr->e_ident[EI_DATA] >= ELFDATANUM)) in ELFW() 81 && ehdr->e_ident[EI_DATA] != ELFDATA2LSB) in ELFW() 83 && ehdr->e_ident[EI_DATA] != ELFDATA2MSB)); in ELFW() 86 update_if_changed (ehdr->e_ident[EI_VERSION], EV_CURRENT, in ELFW()
|
D | elf_getshdrstrndx.c | 108 && elf->state.elf32.ehdr->e_ident[EI_DATA] == MY_ELFDATA in elf_getshdrstrndx() 149 if (elf->state.elf32.ehdr->e_ident[EI_DATA] != MY_ELFDATA) in elf_getshdrstrndx() 173 && elf->state.elf64.ehdr->e_ident[EI_DATA] == MY_ELFDATA in elf_getshdrstrndx() 214 if (elf->state.elf64.ehdr->e_ident[EI_DATA] != MY_ELFDATA) in elf_getshdrstrndx()
|
/third_party/elfutils/tests/ |
D | update1.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() 85 ehdr->e_ident[9] = 2; in main() 108 printf (" %02x", ehdr->e_ident[i]); in main()
|
D | update2.c | 71 printf (" %02x", ehdr->e_ident[i]); in main() 82 ehdr->e_ident[0] = 42; in main() 83 ehdr->e_ident[4] = 1; in main() 84 ehdr->e_ident[5] = 1; in main() 85 ehdr->e_ident[6] = 2; in main() 131 printf (" %02x", ehdr->e_ident[i]); in main()
|
D | update3.c | 80 printf (" %02x", ehdr->e_ident[i]); in main() 91 ehdr->e_ident[0] = 42; in main() 92 ehdr->e_ident[4] = 1; in main() 93 ehdr->e_ident[5] = 1; in main() 94 ehdr->e_ident[6] = 2; in main() 186 printf (" %02x", ehdr->e_ident[i]); in main()
|
D | update4.c | 84 printf (" %02x", ehdr->e_ident[i]); in main() 95 ehdr->e_ident[0] = 42; in main() 96 ehdr->e_ident[4] = 1; in main() 97 ehdr->e_ident[5] = 1; in main() 98 ehdr->e_ident[6] = 2; in main() 338 printf (" %02x", ehdr->e_ident[i]); in main()
|
D | next_cfi.c | 36 handle_section (char *name, const unsigned char e_ident[], in handle_section() argument 70 while ((res = dwarf_next_cfi (e_ident, data, is_eh, off = next_off, in handle_section() 83 if (dwarf_next_cfi (e_ident, data, is_eh, cie_off, &cie_off_next, in handle_section()
|
/third_party/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() 63 if ((BYTE_ORDER == LITTLE_ENDIAN && cfi->e_ident[EI_DATA] == ELFDATA2MSB) in allocate_cfi() 64 || (BYTE_ORDER == BIG_ENDIAN && cfi->e_ident[EI_DATA] == ELFDATA2LSB)) in allocate_cfi() 98 .e_ident = ehdr->e_ident, in parse_eh_frame_hdr() 152 vsize = encoded_value_size (data, ehdr->e_ident, search_table_encoding, in getcfi_gnu_eh_frame() 248 vsize = encoded_value_size (hdr_data, ehdr->e_ident, in getcfi_scn_eh_frame()
|
D | cfi.h | 83 const unsigned char *e_ident; /* For EI_DATA and EI_CLASS. */ member 226 #define BYTE_ORDER_DUMMY(var, e_ident) \ argument 228 { ((BYTE_ORDER == LITTLE_ENDIAN && e_ident[EI_DATA] == ELFDATA2MSB) \ 229 || (BYTE_ORDER == BIG_ENDIAN && e_ident[EI_DATA] == ELFDATA2LSB)) }
|
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() 221 += encoded_value_size (data, e_ident, encoding, NULL); in dwarf_next_cfi() 238 bytes += encoded_value_size (data, e_ident, encoding, bytes); in dwarf_next_cfi()
|
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()
|
/third_party/libunwind/src/ |
D | dl-iterate-phdr.c | 36 #define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \ 37 (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \ 38 (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \ 39 (ehdr).e_ident[EI_MAG3] == ELFMAG3)
|
/third_party/rust/crates/rustix/src/backend/linux_raw/param/ |
D | auxv.rs | 318 if hdr.e_ident[..SELFMAG] != ELFMAG { in check_elf_base() 321 if !matches!(hdr.e_ident[EI_OSABI], ELFOSABI_SYSV | ELFOSABI_LINUX) { in check_elf_base() 324 if hdr.e_ident[EI_ABIVERSION] != ELFABIVERSION { in check_elf_base() 332 if hdr.e_ident[EI_VERSION] != EV_CURRENT in check_elf_base() 353 if hdr.e_ident[EI_CLASS] != ELFCLASS { in check_elf_base() 356 if hdr.e_ident[EI_DATA] != ELFDATA { in check_elf_base()
|
/third_party/flutter/skia/third_party/externals/icu/source/tools/toolutil/ |
D | pkg_genc.cpp | 728 buffer.header32.e_ident[0]!=ELFMAG0 || in getArchitecture() 729 buffer.header32.e_ident[1]!=ELFMAG1 || in getArchitecture() 730 buffer.header32.e_ident[2]!=ELFMAG2 || in getArchitecture() 731 buffer.header32.e_ident[3]!=ELFMAG3 || in getArchitecture() 732 buffer.header32.e_ident[EI_CLASS]<ELFCLASS32 || buffer.header32.e_ident[EI_CLASS]>ELFCLASS64 in getArchitecture() 738 …*pBits= buffer.header32.e_ident[EI_CLASS]==ELFCLASS32 ? 32 : 64; /* only 32 or 64: see check above… in getArchitecture() 751 *pIsBigEndian=(UBool)(buffer.header32.e_ident[EI_DATA]==ELFDATA2MSB); in getArchitecture() 1092 header32.e_ident[EI_DATA]= makeBigEndian ? ELFDATA2MSB : ELFDATA2LSB; in writeObjectCode() 1112 header64.e_ident[EI_DATA]= makeBigEndian ? ELFDATA2MSB : ELFDATA2LSB; in writeObjectCode()
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-subzero/include/llvm/Support/ |
D | ELF.h | 64 unsigned char e_ident[EI_NIDENT]; // ELF Identification bytes member 79 return (memcmp(e_ident, ElfMagic, strlen(ElfMagic))) == 0; in checkMagic() 81 unsigned char getFileClass() const { return e_ident[EI_CLASS]; } in getFileClass() 82 unsigned char getDataEncoding() const { return e_ident[EI_DATA]; } in getDataEncoding() 88 unsigned char e_ident[EI_NIDENT]; member 103 return (memcmp(e_ident, ElfMagic, strlen(ElfMagic))) == 0; in checkMagic() 105 unsigned char getFileClass() const { return e_ident[EI_CLASS]; } in getFileClass() 106 unsigned char getDataEncoding() const { return e_ident[EI_DATA]; } in getDataEncoding()
|
/third_party/elfutils/libdwfl/ |
D | elf-from-memory.c | 200 bool class32 = ehdr.e32.e_ident[EI_CLASS] == ELFCLASS32; in elf_from_remote_memory() 229 if (! elf32_xlatetom (&xlateto, &xlatefrom, ehdr.e32.e_ident[EI_DATA])) in elf_from_remote_memory() 234 if (! elf64_xlatetom (&xlateto, &xlatefrom, ehdr.e64.e_ident[EI_DATA])) in elf_from_remote_memory() 344 ehdr.e32.e_ident[EI_DATA]) == NULL) in elf_from_remote_memory() 352 ehdr.e64.e_ident[EI_DATA]) == NULL) in elf_from_remote_memory()
|
/third_party/elfutils/libasm/ |
D | asm_begin.c | 101 ehdr->e_ident[EI_CLASS] = class; in prepare_binary_output() 102 ehdr->e_ident[EI_DATA] = ebl_get_elfdata (ebl); in prepare_binary_output() 104 memcpy (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG); in prepare_binary_output()
|
/third_party/skia/third_party/externals/icu/source/tools/toolutil/ |
D | pkg_genc.cpp | 823 buffer.header32.e_ident[0]!=ELFMAG0 || in getArchitecture() 824 buffer.header32.e_ident[1]!=ELFMAG1 || in getArchitecture() 825 buffer.header32.e_ident[2]!=ELFMAG2 || in getArchitecture() 826 buffer.header32.e_ident[3]!=ELFMAG3 || in getArchitecture() 827 buffer.header32.e_ident[EI_CLASS]<ELFCLASS32 || buffer.header32.e_ident[EI_CLASS]>ELFCLASS64 in getArchitecture() 833 …*pBits= buffer.header32.e_ident[EI_CLASS]==ELFCLASS32 ? 32 : 64; /* only 32 or 64: see check above… in getArchitecture() 846 *pIsBigEndian=(UBool)(buffer.header32.e_ident[EI_DATA]==ELFDATA2MSB); in getArchitecture() 1210 header32.e_ident[EI_DATA]= makeBigEndian ? ELFDATA2MSB : ELFDATA2LSB; in writeObjectCode() 1230 header64.e_ident[EI_DATA]= makeBigEndian ? ELFDATA2MSB : ELFDATA2LSB; in writeObjectCode()
|
/third_party/icu/icu4c/source/tools/toolutil/ |
D | pkg_genc.cpp | 823 buffer.header32.e_ident[0]!=ELFMAG0 || in getArchitecture() 824 buffer.header32.e_ident[1]!=ELFMAG1 || in getArchitecture() 825 buffer.header32.e_ident[2]!=ELFMAG2 || in getArchitecture() 826 buffer.header32.e_ident[3]!=ELFMAG3 || in getArchitecture() 827 buffer.header32.e_ident[EI_CLASS]<ELFCLASS32 || buffer.header32.e_ident[EI_CLASS]>ELFCLASS64 in getArchitecture() 833 …*pBits= buffer.header32.e_ident[EI_CLASS]==ELFCLASS32 ? 32 : 64; /* only 32 or 64: see check above… in getArchitecture() 846 *pIsBigEndian=(UBool)(buffer.header32.e_ident[EI_DATA]==ELFDATA2MSB); in getArchitecture() 1210 header32.e_ident[EI_DATA]= makeBigEndian ? ELFDATA2MSB : ELFDATA2LSB; in writeObjectCode() 1230 header64.e_ident[EI_DATA]= makeBigEndian ? ELFDATA2MSB : ELFDATA2LSB; in writeObjectCode()
|
/third_party/node/deps/icu-small/source/tools/toolutil/ |
D | pkg_genc.cpp | 823 buffer.header32.e_ident[0]!=ELFMAG0 || in getArchitecture() 824 buffer.header32.e_ident[1]!=ELFMAG1 || in getArchitecture() 825 buffer.header32.e_ident[2]!=ELFMAG2 || in getArchitecture() 826 buffer.header32.e_ident[3]!=ELFMAG3 || in getArchitecture() 827 buffer.header32.e_ident[EI_CLASS]<ELFCLASS32 || buffer.header32.e_ident[EI_CLASS]>ELFCLASS64 in getArchitecture() 833 …*pBits= buffer.header32.e_ident[EI_CLASS]==ELFCLASS32 ? 32 : 64; /* only 32 or 64: see check above… in getArchitecture() 846 *pIsBigEndian=(UBool)(buffer.header32.e_ident[EI_DATA]==ELFDATA2MSB); in getArchitecture() 1210 header32.e_ident[EI_DATA]= makeBigEndian ? ELFDATA2MSB : ELFDATA2LSB; in writeObjectCode() 1230 header64.e_ident[EI_DATA]= makeBigEndian ? ELFDATA2MSB : ELFDATA2LSB; in writeObjectCode()
|