Home
last modified time | relevance | path

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

/llvm-project-15.0.7/llvm/lib/InterfaceStub/
H A DELFObjHandler.cpp54 ElfHeader.e_ident[EI_MAG0] = ElfMagic[EI_MAG0]; in initELFHeader()
55 ElfHeader.e_ident[EI_MAG1] = ElfMagic[EI_MAG1]; in initELFHeader()
56 ElfHeader.e_ident[EI_MAG2] = ElfMagic[EI_MAG2]; in initELFHeader()
57 ElfHeader.e_ident[EI_MAG3] = ElfMagic[EI_MAG3]; in initELFHeader()
58 ElfHeader.e_ident[EI_CLASS] = ELFT::Is64Bits ? ELFCLASS64 : ELFCLASS32; in initELFHeader()
60 ElfHeader.e_ident[EI_DATA] = IsLittleEndian ? ELFDATA2LSB : ELFDATA2MSB; in initELFHeader()
61 ElfHeader.e_ident[EI_VERSION] = EV_CURRENT; in initELFHeader()
62 ElfHeader.e_ident[EI_OSABI] = ELFOSABI_NONE; in initELFHeader()
604 convertELFBitWidthToIFS(ElfFile.getHeader().e_ident[EI_CLASS]); in buildStub()
606 convertELFEndiannessToIFS(ElfFile.getHeader().e_ident[EI_DATA]); in buildStub()
/llvm-project-15.0.7/lldb/source/Plugins/ObjectFile/ELF/
H A DELFHeader.h57 unsigned char e_ident[llvm::ELF::EI_NIDENT]; ///< ELF file identification. member
86 return e_ident[llvm::ELF::EI_CLASS] == llvm::ELF::ELFCLASS32; in Is32Bit()
94 return e_ident[llvm::ELF::EI_CLASS] == llvm::ELF::ELFCLASS64; in Is64Bit()
H A DObjectFileELF.cpp250 uint32_t endian = header.e_ident[EI_DATA]; in mipsVariantFromElfFlags()
252 uint32_t fileclass = header.e_ident[EI_CLASS]; in mipsVariantFromElfFlags()
302 uint32_t fileclass = header.e_ident[EI_CLASS]; in riscvVariantFromElfFlags()
314 uint32_t endian = header.e_ident[EI_DATA]; in ppc64VariantFromElfFlags()
717 if (m_header.e_ident[EI_DATA] == ELFDATA2MSB) in GetByteOrder()
719 if (m_header.e_ident[EI_DATA] == ELFDATA2LSB) in GetByteOrder()
1347 header.e_ident[EI_OSABI]); in GetSectionHeaderInfo()
1355 GetOsFromOSABI(header.e_ident[EI_OSABI], ostype); in GetSectionHeaderInfo()
3017 header.e_ident[EI_MAG1]); in DumpELFHeader()
3019 header.e_ident[EI_MAG2]); in DumpELFHeader()
[all …]
H A DELFHeader.cpp74 if (e_ident[EI_DATA] == ELFDATA2MSB) in GetByteOrder()
76 if (e_ident[EI_DATA] == ELFDATA2LSB) in GetByteOrder()
117 if (data.GetU8(offset, &e_ident, EI_NIDENT) == nullptr) in Parse()
/llvm-project-15.0.7/bolt/unittests/Core/
H A DBinaryContext.cpp34 EHdr->e_ident[llvm::ELF::EI_CLASS] = llvm::ELF::ELFCLASS64; in prepareElf()
35 EHdr->e_ident[llvm::ELF::EI_DATA] = llvm::ELF::ELFDATA2LSB; in prepareElf()
H A DMCPlusBuilder.cpp44 EHdr->e_ident[llvm::ELF::EI_CLASS] = llvm::ELF::ELFCLASS64; in prepareElf()
45 EHdr->e_ident[llvm::ELF::EI_DATA] = llvm::ELF::ELFDATA2LSB; in prepareElf()
/llvm-project-15.0.7/llvm/include/llvm/BinaryFormat/
H A DELF.h62 unsigned char e_ident[EI_NIDENT]; // ELF Identification bytes member
78 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
104 return (memcmp(e_ident, ElfMagic, strlen(ElfMagic))) == 0; in checkMagic()
107 unsigned char getFileClass() const { return e_ident[EI_CLASS]; } in getFileClass()
108 unsigned char getDataEncoding() const { return e_ident[EI_DATA]; } in getDataEncoding()
/llvm-project-15.0.7/llvm/test/tools/llvm-readobj/ELF/
H A Dfile-header-format.test3 ## The "Format" value printed depends on values stored in e_ident[EI_CLASS],
4 ## e_ident[EI_DATA] and e_machine fields of an ELF file header.
/llvm-project-15.0.7/llvm/unittests/Object/
H A DELFObjectFileTest.cpp29 Ehdr.e_ident[ELF::EI_MAG0] = 0x7f; in makeElfData()
30 Ehdr.e_ident[ELF::EI_MAG1] = 'E'; in makeElfData()
31 Ehdr.e_ident[ELF::EI_MAG2] = 'L'; in makeElfData()
32 Ehdr.e_ident[ELF::EI_MAG3] = 'F'; in makeElfData()
33 Ehdr.e_ident[ELF::EI_CLASS] = Class; in makeElfData()
34 Ehdr.e_ident[ELF::EI_DATA] = Encoding; in makeElfData()
35 Ehdr.e_ident[ELF::EI_VERSION] = 1; in makeElfData()
H A DXCOFFObjectFileTest.cpp25 EHdr->e_ident[llvm::ELF::EI_CLASS] = llvm::ELF::ELFCLASS64; in TEST()
26 EHdr->e_ident[llvm::ELF::EI_DATA] = llvm::ELF::ELFDATA2LSB; in TEST()
/llvm-project-15.0.7/llvm/include/llvm/Object/
H A DELFTypes.h482 unsigned char e_ident[ELF::EI_NIDENT]; // ELF Identification bytes
499 return (memcmp(e_ident, ELF::ElfMagic, strlen(ELF::ElfMagic))) == 0;
502 unsigned char getFileClass() const { return e_ident[ELF::EI_CLASS]; }
503 unsigned char getDataEncoding() const { return e_ident[ELF::EI_DATA]; }
H A DELFObjectFile.h1180 switch (EF.getHeader().e_ident[ELF::EI_CLASS]) { in getFileFormatName()
1275 switch (EF.getHeader().e_ident[ELF::EI_CLASS]) { in getArch()
1290 switch (EF.getHeader().e_ident[ELF::EI_CLASS]) { in getArch()
1331 switch (EF.getHeader().e_ident[ELF::EI_CLASS]) { in getArch()
/llvm-project-15.0.7/llvm/lib/ObjCopy/ELF/
H A DELFObject.cpp1858 Obj.OSABI = Ehdr.e_ident[EI_OSABI]; in build()
1859 Obj.ABIVersion = Ehdr.e_ident[EI_ABIVERSION]; in build()
1943 std::fill(Ehdr.e_ident, Ehdr.e_ident + 16, 0); in writeEhdr()
1944 Ehdr.e_ident[EI_MAG0] = 0x7f; in writeEhdr()
1945 Ehdr.e_ident[EI_MAG1] = 'E'; in writeEhdr()
1946 Ehdr.e_ident[EI_MAG2] = 'L'; in writeEhdr()
1947 Ehdr.e_ident[EI_MAG3] = 'F'; in writeEhdr()
1949 Ehdr.e_ident[EI_DATA] = in writeEhdr()
1951 Ehdr.e_ident[EI_VERSION] = EV_CURRENT; in writeEhdr()
1952 Ehdr.e_ident[EI_OSABI] = Obj.OSABI; in writeEhdr()
[all …]
/llvm-project-15.0.7/lld/ELF/Arch/
H A DAMDGPU.cpp115 .e_ident[EI_ABIVERSION]; in calcEFlags()
/llvm-project-15.0.7/llvm/lib/ObjectYAML/
H A DELFEmitter.cpp461 Header.e_ident[EI_MAG0] = 0x7f; in writeELFHeader()
462 Header.e_ident[EI_MAG1] = 'E'; in writeELFHeader()
463 Header.e_ident[EI_MAG2] = 'L'; in writeELFHeader()
464 Header.e_ident[EI_MAG3] = 'F'; in writeELFHeader()
465 Header.e_ident[EI_CLASS] = ELFT::Is64Bits ? ELFCLASS64 : ELFCLASS32; in writeELFHeader()
466 Header.e_ident[EI_DATA] = Doc.Header.Data; in writeELFHeader()
467 Header.e_ident[EI_VERSION] = EV_CURRENT; in writeELFHeader()
468 Header.e_ident[EI_OSABI] = Doc.Header.OSABI; in writeELFHeader()
469 Header.e_ident[EI_ABIVERSION] = Doc.Header.ABIVersion; in writeELFHeader()
/llvm-project-15.0.7/llvm/tools/llvm-readobj/
H A DELFDumper.cpp3318 OS << format(" %02x", static_cast<int>(e.e_ident[i])); in printFileHeaders()
3320 Str = enumToString(e.e_ident[ELF::EI_CLASS], makeArrayRef(ElfClass)); in printFileHeaders()
3327 OS << utohexstr(e.e_ident[ELF::EI_VERSION]); in printFileHeaders()
3331 Str = enumToString(e.e_ident[ELF::EI_OSABI], makeArrayRef(ElfOSABI)); in printFileHeaders()
6449 W.printEnum("DataEncoding", E.e_ident[ELF::EI_DATA], in printFileHeaders()
6451 W.printNumber("FileVersion", E.e_ident[ELF::EI_VERSION]); in printFileHeaders()
6454 if (E.e_ident[ELF::EI_OSABI] >= ELF::ELFOSABI_FIRST_ARCH && in printFileHeaders()
6455 E.e_ident[ELF::EI_OSABI] <= ELF::ELFOSABI_LAST_ARCH) { in printFileHeaders()
6468 W.printEnum("OS/ABI", E.e_ident[ELF::EI_OSABI], OSABI); in printFileHeaders()
6469 W.printNumber("ABIVersion", E.e_ident[ELF::EI_ABIVERSION]); in printFileHeaders()
[all …]
/llvm-project-15.0.7/lld/ELF/
H A DSyntheticSections.cpp3739 eHdr->e_ident[EI_CLASS] = config->is64 ? ELFCLASS64 : ELFCLASS32; in writeEhdr()
3740 eHdr->e_ident[EI_DATA] = config->isLE ? ELFDATA2LSB : ELFDATA2MSB; in writeEhdr()
3741 eHdr->e_ident[EI_VERSION] = EV_CURRENT; in writeEhdr()
3742 eHdr->e_ident[EI_OSABI] = config->osabi; in writeEhdr()
3743 eHdr->e_ident[EI_ABIVERSION] = getAbiVersion(); in writeEhdr()
H A DInputFiles.cpp336 osabi = obj.getHeader().e_ident[llvm::ELF::EI_OSABI]; in init()
337 abiVersion = obj.getHeader().e_ident[llvm::ELF::EI_ABIVERSION]; in init()
/llvm-project-15.0.7/llvm/tools/obj2yaml/
H A Delf2yaml.cpp280 Y->Header.OSABI = Obj.getHeader().e_ident[ELF::EI_OSABI]; in dump()
281 Y->Header.ABIVersion = Obj.getHeader().e_ident[ELF::EI_ABIVERSION]; in dump()
/llvm-project-15.0.7/lldb/source/Plugins/Process/elf-core/
H A DProcessElfCore.cpp71 if (elf_header.e_ident[7] == 0xFF && elf_header.e_version == 0) in CreateInstance()
/llvm-project-15.0.7/llvm/docs/
H A DAMDGPUUsage.rst1008 ``e_ident[EI_CLASS]`` ``ELFCLASS64``
1009 ``e_ident[EI_DATA]`` ``ELFDATA2LSB``
1010 ``e_ident[EI_OSABI]`` - ``ELFOSABI_NONE``
1014 ``e_ident[EI_ABIVERSION]`` - ``ELFABIVERSION_AMDGPU_HSA_V2``
1050 ``e_ident[EI_CLASS]``
1058 ``e_ident[EI_DATA]``
1061 ``e_ident[EI_OSABI]``
1073 ``e_ident[EI_ABIVERSION]``