diff options
Diffstat (limited to 'include/llvm/Object')
-rw-r--r-- | include/llvm/Object/MachOFormat.h | 18 | ||||
-rw-r--r-- | include/llvm/Object/MachOObject.h | 3 |
2 files changed, 19 insertions, 2 deletions
diff --git a/include/llvm/Object/MachOFormat.h b/include/llvm/Object/MachOFormat.h index 089cde9..f30d431 100644 --- a/include/llvm/Object/MachOFormat.h +++ b/include/llvm/Object/MachOFormat.h @@ -97,7 +97,8 @@ namespace macho { DysymtabLoadCommandSize = 80, Nlist32Size = 12, Nlist64Size = 16, - RelocationInfoSize = 8 + RelocationInfoSize = 8, + LinkeditLoadCommandSize = 16 }; /// \brief Constants for header magic field. @@ -140,7 +141,8 @@ namespace macho { LCT_UUID = 0x1b, LCT_CodeSignature = 0x1d, LCT_SegmentSplitInfo = 0x1e, - LCT_FunctionStarts = 0x26 + LCT_FunctionStarts = 0x26, + LCT_DataInCode = 0x29 }; /// \brief Load command structure. @@ -280,6 +282,18 @@ namespace macho { }; /// @} + /// @name Data-in-code Table Entry + /// @{ + + // See <mach-o/loader.h>. + enum DataRegionType { Data = 1, JumpTable8, JumpTable16, JumpTable32 }; + struct DataInCodeTableEntry { + uint32_t Offset; /* from mach_header to start of data region */ + uint16_t Length; /* number of bytes in data region */ + uint16_t Kind; /* a DataRegionType value */ + }; + + /// @} /// @name Indirect Symbol Table /// @{ diff --git a/include/llvm/Object/MachOObject.h b/include/llvm/Object/MachOObject.h index 0560402..86f150a 100644 --- a/include/llvm/Object/MachOObject.h +++ b/include/llvm/Object/MachOObject.h @@ -174,6 +174,9 @@ public: void ReadSymbol64TableEntry( uint64_t SymbolTableOffset, unsigned Index, InMemoryStruct<macho::Symbol64TableEntry> &Res) const; + void ReadDataInCodeTableEntry( + uint64_t TableOffset, unsigned Index, + InMemoryStruct<macho::DataInCodeTableEntry> &Res) const; void ReadULEB128s(uint64_t Index, SmallVectorImpl<uint64_t> &Out) const; /// @} |