Lines Matching defs:XCOFFObjectFile
1 //===--- XCOFFObjectFile.cpp - XCOFF object file implementation -----------===//
9 // This file defines the XCOFFObjectFile class.
13 #include "llvm/Object/XCOFFObjectFile.h"
128 XCOFFObjectFile::getAdvancedSymbolEntryAddress(uintptr_t CurrentAddress,
134 XCOFFObjectFile::getSymbolAuxType(uintptr_t AuxEntryAddress) const {
140 void XCOFFObjectFile::checkSectionAddress(uintptr_t Addr,
155 XCOFFObjectFile::toSection32(DataRefImpl Ref) const {
164 XCOFFObjectFile::toSection64(DataRefImpl Ref) const {
172 XCOFFSymbolRef XCOFFObjectFile::toSymbolRef(DataRefImpl Ref) const {
180 const XCOFFFileHeader32 *XCOFFObjectFile::fileHeader32() const {
185 const XCOFFFileHeader64 *XCOFFObjectFile::fileHeader64() const {
190 const XCOFFAuxiliaryHeader32 *XCOFFObjectFile::auxiliaryHeader32() const {
195 const XCOFFAuxiliaryHeader64 *XCOFFObjectFile::auxiliaryHeader64() const {
200 template <typename T> const T *XCOFFObjectFile::sectionHeaderTable() const {
205 XCOFFObjectFile::sectionHeaderTable32() const {
211 XCOFFObjectFile::sectionHeaderTable64() const {
216 void XCOFFObjectFile::moveSymbolNext(DataRefImpl &Symb) const {
229 XCOFFObjectFile::getStringTableEntry(uint32_t Offset) const {
246 StringRef XCOFFObjectFile::getStringTable() const {
254 XCOFFObjectFile::getCFileName(const XCOFFFileAuxEnt *CFileEntPtr) const {
260 Expected<StringRef> XCOFFObjectFile::getSymbolName(DataRefImpl Symb) const {
264 Expected<uint64_t> XCOFFObjectFile::getSymbolAddress(DataRefImpl Symb) const {
268 uint64_t XCOFFObjectFile::getSymbolValueImpl(DataRefImpl Symb) const {
272 uint32_t XCOFFObjectFile::getSymbolAlignment(DataRefImpl Symb) const {
287 uint64_t XCOFFObjectFile::getCommonSymbolSizeImpl(DataRefImpl Symb) const {
306 XCOFFObjectFile::getSymbolType(DataRefImpl Symb) const {
340 SecName = XCOFFObjectFile::toSection64(SecDRIOrErr.get())->getName();
342 SecName = XCOFFObjectFile::toSection32(SecDRIOrErr.get())->getName();
359 XCOFFObjectFile::getSymbolSection(DataRefImpl Symb) const {
372 void XCOFFObjectFile::moveSectionNext(DataRefImpl &Sec) const {
377 Expected<StringRef> XCOFFObjectFile::getSectionName(DataRefImpl Sec) const {
381 uint64_t XCOFFObjectFile::getSectionAddress(DataRefImpl Sec) const {
390 uint64_t XCOFFObjectFile::getSectionIndex(DataRefImpl Sec) const {
399 uint64_t XCOFFObjectFile::getSectionSize(DataRefImpl Sec) const {
409 XCOFFObjectFile::getSectionContents(DataRefImpl Sec) const {
431 uint64_t XCOFFObjectFile::getSectionAlignment(DataRefImpl Sec) const {
437 uint64_t XCOFFObjectFile::getSectionFileOffsetToRawData(DataRefImpl Sec) const {
444 Expected<uintptr_t> XCOFFObjectFile::getSectionFileOffsetToRawData(
491 bool XCOFFObjectFile::isSectionCompressed(DataRefImpl Sec) const {
495 bool XCOFFObjectFile::isSectionText(DataRefImpl Sec) const {
499 bool XCOFFObjectFile::isSectionData(DataRefImpl Sec) const {
504 bool XCOFFObjectFile::isSectionBSS(DataRefImpl Sec) const {
509 bool XCOFFObjectFile::isDebugSection(DataRefImpl Sec) const {
514 bool XCOFFObjectFile::isSectionVirtual(DataRefImpl Sec) const {
519 relocation_iterator XCOFFObjectFile::section_rel_begin(DataRefImpl Sec) const {
545 relocation_iterator XCOFFObjectFile::section_rel_end(DataRefImpl Sec) const {
571 void XCOFFObjectFile::moveRelocationNext(DataRefImpl &Rel) const {
578 uint64_t XCOFFObjectFile::getRelocationOffset(DataRefImpl Rel) const {
611 symbol_iterator XCOFFObjectFile::getRelocationSymbol(DataRefImpl Rel) const {
631 uint64_t XCOFFObjectFile::getRelocationType(DataRefImpl Rel) const {
637 void XCOFFObjectFile::getRelocationTypeName(
650 Expected<uint32_t> XCOFFObjectFile::getSymbolFlags(DataRefImpl Symb) const {
690 basic_symbol_iterator XCOFFObjectFile::symbol_begin() const {
696 basic_symbol_iterator XCOFFObjectFile::symbol_end() const {
703 XCOFFObjectFile::xcoff_symbol_iterator_range XCOFFObjectFile::symbols() const {
707 section_iterator XCOFFObjectFile::section_begin() const {
713 section_iterator XCOFFObjectFile::section_end() const {
720 uint8_t XCOFFObjectFile::getBytesInAddress() const { return is64Bit() ? 8 : 4; }
722 StringRef XCOFFObjectFile::getFileFormatName() const {
726 Triple::ArchType XCOFFObjectFile::getArch() const {
730 Expected<SubtargetFeatures> XCOFFObjectFile::getFeatures() const {
734 bool XCOFFObjectFile::isRelocatableObject() const {
740 Expected<uint64_t> XCOFFObjectFile::getStartAddress() const {
748 StringRef XCOFFObjectFile::mapDebugSectionName(StringRef Name) const {
764 size_t XCOFFObjectFile::getFileHeaderSize() const {
768 size_t XCOFFObjectFile::getSectionHeaderSize() const {
773 bool XCOFFObjectFile::is64Bit() const {
777 Expected<StringRef> XCOFFObjectFile::getRawData(const char *Start,
790 uint16_t XCOFFObjectFile::getMagic() const {
794 Expected<DataRefImpl> XCOFFObjectFile::getSectionByNum(int16_t Num) const {
807 XCOFFObjectFile::getSectionByType(XCOFF::SectionTypeFlags SectType) const {
823 XCOFFObjectFile::getSymbolSectionName(XCOFFSymbolRef SymEntPtr) const {
842 unsigned XCOFFObjectFile::getSymbolSectionID(SymbolRef Sym) const {
847 bool XCOFFObjectFile::isReservedSectionNumber(int16_t SectionNumber) {
851 uint16_t XCOFFObjectFile::getNumberOfSections() const {
856 int32_t XCOFFObjectFile::getTimeStamp() const {
860 uint16_t XCOFFObjectFile::getOptionalHeaderSize() const {
865 uint32_t XCOFFObjectFile::getSymbolTableOffset32() const {
869 int32_t XCOFFObjectFile::getRawNumberOfSymbolTableEntries32() const {
876 uint32_t XCOFFObjectFile::getLogicalNumberOfSymbolTableEntries32() const {
882 uint64_t XCOFFObjectFile::getSymbolTableOffset64() const {
886 uint32_t XCOFFObjectFile::getNumberOfSymbolTableEntries64() const {
890 uint32_t XCOFFObjectFile::getNumberOfSymbolTableEntries() const {
895 uintptr_t XCOFFObjectFile::getEndOfSymbolTableAddress() const {
901 void XCOFFObjectFile::checkSymbolEntryPointer(uintptr_t SymbolEntPtr) const {
916 uint32_t XCOFFObjectFile::getSymbolIndex(uintptr_t SymbolEntPtr) const {
922 uint64_t XCOFFObjectFile::getSymbolSize(DataRefImpl Symb) const {
941 uintptr_t XCOFFObjectFile::getSymbolEntryAddressByIndex(uint32_t Index) const {
947 XCOFFObjectFile::getSymbolNameByIndex(uint32_t Index) const {
960 uint16_t XCOFFObjectFile::getFlags() const {
964 const char *XCOFFObjectFile::getSectionNameInternal(DataRefImpl Sec) const {
968 uintptr_t XCOFFObjectFile::getSectionHeaderTableAddress() const {
972 int32_t XCOFFObjectFile::getSectionFlags(DataRefImpl Sec) const {
976 XCOFFObjectFile::XCOFFObjectFile(unsigned int Type, MemoryBufferRef Object)
981 ArrayRef<XCOFFSectionHeader64> XCOFFObjectFile::sections64() const {
988 ArrayRef<XCOFFSectionHeader32> XCOFFObjectFile::sections32() const {
1000 Expected<uint32_t> XCOFFObjectFile::getNumberOfRelocationEntries(
1018 Expected<ArrayRef<Reloc>> XCOFFObjectFile::relocations(const Shdr &Sec) const {
1045 Expected<ArrayRef<ExceptEnt>> XCOFFObjectFile::getExceptionEntries() const {
1065 XCOFFObjectFile::getExceptionEntries() const;
1067 XCOFFObjectFile::getExceptionEntries() const;
1070 XCOFFObjectFile::parseStringTable(const XCOFFObjectFile *Obj, uint64_t Offset) {
1105 Expected<StringRef> XCOFFObjectFile::getImportFileTable() const {
1152 Expected<std::unique_ptr<XCOFFObjectFile>>
1153 XCOFFObjectFile::create(unsigned Type, MemoryBufferRef MBR) {
1155 std::unique_ptr<XCOFFObjectFile> Obj;
1156 Obj.reset(new XCOFFObjectFile(Type, MBR));
1234 return XCOFFObjectFile::create(FileType, MemBufRef);
1237 std::optional<StringRef> XCOFFObjectFile::tryGetCPUName() const {
1332 uintptr_t AuxAddr = XCOFFObjectFile::getAdvancedSymbolEntryAddress(
1340 uintptr_t AuxAddr = XCOFFObjectFile::getAdvancedSymbolEntryAddress(
1382 llvm::object::XCOFFObjectFile::relocations<
1387 llvm::object::XCOFFObjectFile::relocations<