13 #ifndef LLVM_OBJECT_XCOFFOBJECTFILE_H 14 #define LLVM_OBJECT_XCOFFOBJECTFILE_H 52 static constexpr
unsigned SectionFlagsReservedMask = 0x7;
55 static constexpr
unsigned SectionFlagsTypeMask = 0xffffu;
60 bool isReservedSectionType()
const;
97 enum { NAME_IN_STR_TBL_MAGIC = 0x0 };
156 uint8_t ReservedZeros[2];
172 static constexpr uint8_t XR_SIGN_INDICATOR_MASK = 0x80;
176 static constexpr uint8_t XR_FIXUP_INDICATOR_MASK = 0x40;
180 static constexpr uint8_t XR_BIASED_LENGTH_MASK = 0x3f;
192 bool isRelocationSigned()
const;
193 bool isFixupIndicated()
const;
196 uint8_t getRelocatedLength()
const;
201 const void *FileHeader =
nullptr;
202 const void *SectionHeaderTable =
nullptr;
213 size_t getFileHeaderSize()
const;
214 size_t getSectionHeaderSize()
const;
218 uintptr_t getSectionHeaderTableAddress()
const;
219 uintptr_t getEndOfSymbolTableAddress()
const;
224 const char *getSectionNameInternal(
DataRefImpl Sec)
const;
247 void checkSectionAddress(uintptr_t Addr, uintptr_t TableAddr)
const;
251 void moveSymbolNext(
DataRefImpl &Symb)
const override;
258 uint64_t getSymbolValueImpl(
DataRefImpl Symb)
const override;
259 uint64_t getCommonSymbolSizeImpl(
DataRefImpl Symb)
const override;
263 void moveSectionNext(
DataRefImpl &Sec)
const override;
265 uint64_t getSectionAddress(
DataRefImpl Sec)
const override;
266 uint64_t getSectionIndex(
DataRefImpl Sec)
const override;
267 uint64_t getSectionSize(
DataRefImpl Sec)
const override;
269 getSectionContents(
DataRefImpl Sec)
const override;
270 uint64_t getSectionAlignment(
DataRefImpl Sec)
const override;
271 bool isSectionCompressed(
DataRefImpl Sec)
const override;
272 bool isSectionText(
DataRefImpl Sec)
const override;
273 bool isSectionData(
DataRefImpl Sec)
const override;
276 bool isSectionVirtual(
DataRefImpl Sec)
const override;
280 void moveRelocationNext(
DataRefImpl &Rel)
const override;
281 uint64_t getRelocationOffset(
DataRefImpl Rel)
const override;
283 uint64_t getRelocationType(
DataRefImpl Rel)
const override;
289 uint8_t getBytesInAddress()
const override;
290 StringRef getFileFormatName()
const override;
294 bool isRelocatableObject()
const override;
300 assert(!
is64Bit() &&
"Symbol table handling not supported yet.");
311 uint16_t getNumberOfSections()
const;
312 int32_t getTimeStamp()
const;
316 uint32_t getSymbolTableOffset32()
const;
317 uint64_t getSymbolTableOffset64()
const;
321 int32_t getRawNumberOfSymbolTableEntries32()
const;
324 uint32_t getLogicalNumberOfSymbolTableEntries32()
const;
326 uint32_t getNumberOfSymbolTableEntries64()
const;
327 uint32_t getSymbolIndex(uintptr_t SymEntPtr)
const;
331 uint16_t getOptionalHeaderSize()
const;
341 void checkSymbolEntryPointer(uintptr_t SymbolEntPtr)
const;
358 : SymEntDataRef(SymEntDataRef), OwningObjectPtr(OwningObjectPtr){};
361 uint8_t getNumberOfAuxEntries()
const;
364 int16_t getSectionNumber()
const;
366 bool hasCsectAuxEnt()
const;
367 bool isFunction()
const;
373 #endif // LLVM_OBJECT_XCOFFOBJECTFILE_H
support::ubig32_t ParameterHashIndex
XCOFF::RelocationType Type
This class represents lattice values for constants.
uint8_t SymbolAlignmentAndType
support::ubig32_t StabInfoIndex
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
XCOFF::StorageMappingClass StorageMappingClass
This class is the base class for all object file types.
support::ubig16_t TypeChkSectNum
static uint32_t getSectionFlags(const MachOObjectFile &O, DataRefImpl Sec)
support::ubig16_t NumberOfLineNum
support::ubig32_t SectionLength
static Expected< std::unique_ptr< ObjectFile > > createXCOFFObjectFile(MemoryBufferRef Object, unsigned FileType)
constexpr char SymbolName[]
Key for Kernel::Metadata::mSymbolName.
static StringRef getSymbolName(SymbolKind SymKind)
CFileLanguageIdAndTypeIdType CFileLanguageIdAndTypeId
The access may reference the value stored in memory.
static StringRef getName(Value *V)
Tagged union holding either a T or a Error.
support::ubig32_t VirtualAddress
bool isReservedSectionNumber(int32_t SectionNumber)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
support::ubig16_t NumberOfRelocEnt
static FeatureBitset getFeatures(StringRef CPU, StringRef FS, ArrayRef< SubtargetSubTypeKV > ProcDesc, ArrayRef< SubtargetFeatureKV > ProcFeatures)
The instances of the Type class are immutable: once they are created, they are never changed...
StorageMappingClass
Storage Mapping Class definitions.
XCOFF::StorageClass StorageClass
support::ubig16_t StabSectNum
NameInStrTblType NameInStrTbl
static wasm::ValType getType(const TargetRegisterClass *RC)
support::ubig16_t SymbolType
support::big16_t SectionNumber
XCOFFSymbolRef(DataRefImpl SymEntDataRef, const XCOFFObjectFile *OwningObjectPtr)
FileType
Defines the file type this file represents.
const XCOFFSymbolEntry * getPointerToSymbolTable() const
static uint32_t getFlags(const Symbol *Sym)
Manages the enabling and disabling of subtarget specific features.
XCOFF::CFileStringType Type
static std::unique_ptr< PDBSymbol > getSymbolType(const PDBSymbol &Symbol)
support::ubig32_t SectionOrLength
uint8_t NumberOfAuxEntries
support::ubig32_t SymbolIndex
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
StringRef - Represent a constant reference to a string, i.e.
static bool is64Bit(const char *name)
NameInStrTblType NameInStrTbl