X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FObject%2FMachOFormat.h;h=c0f700d3c870ad0125ea3c6f9bf69518aace28b9;hb=b21d9aebba7e45ddcbce61dd501000049cefb335;hp=bb8820dabf7694e5f5ed3d8e11388999387a1292;hpb=f3eb3bba1614a7935b44fc963a805088d71267f3;p=oota-llvm.git diff --git a/include/llvm/Object/MachOFormat.h b/include/llvm/Object/MachOFormat.h index bb8820dabf7..c0f700d3c87 100644 --- a/include/llvm/Object/MachOFormat.h +++ b/include/llvm/Object/MachOFormat.h @@ -61,7 +61,10 @@ namespace mach { CSARM_V6 = 6, CSARM_V5TEJ = 7, CSARM_XSCALE = 8, - CSARM_V7 = 9 + CSARM_V7 = 9, + CSARM_V7F = 10, + CSARM_V7S = 11, + CSARM_V7K = 12 }; /// \brief PowerPC Machine Subtypes. @@ -97,7 +100,8 @@ namespace macho { DysymtabLoadCommandSize = 80, Nlist32Size = 12, Nlist64Size = 16, - RelocationInfoSize = 8 + RelocationInfoSize = 8, + LinkeditLoadCommandSize = 16 }; /// \brief Constants for header magic field. @@ -137,7 +141,11 @@ namespace macho { LCT_Symtab = 0x2, LCT_Dysymtab = 0xb, LCT_Segment64 = 0x19, - LCT_UUID = 0x1b + LCT_UUID = 0x1b, + LCT_CodeSignature = 0x1d, + LCT_SegmentSplitInfo = 0x1e, + LCT_FunctionStarts = 0x26, + LCT_DataInCode = 0x29 }; /// \brief Load command structure. @@ -218,6 +226,13 @@ namespace macho { uint32_t NumLocalRelocationTableEntries; }; + struct LinkeditDataLoadCommand { + uint32_t Type; + uint32_t Size; + uint32_t DataOffset; + uint32_t DataSize; + }; + /// @} /// @name Section Data /// @{ @@ -261,6 +276,10 @@ namespace macho { uint16_t Flags; uint32_t Value; }; + // Despite containing a uint64_t, this structure is only 4-byte aligned within + // a MachO file. +#pragma pack(push) +#pragma pack(4) struct Symbol64TableEntry { uint32_t StringIndex; uint8_t Type; @@ -268,6 +287,19 @@ namespace macho { uint16_t Flags; uint64_t Value; }; +#pragma pack(pop) + + /// @} + /// @name Data-in-code Table Entry + /// @{ + + // See . + 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 @@ -347,7 +379,7 @@ namespace macho { RIT_X86_64_TLV = 9 }; - /// ARM also has its own relocation types. + /// ARM uses its own relocation types. enum RelocationInfoTypeARM { RIT_ARM_LocalDifference = 3, RIT_ARM_PreboundLazyPointer = 4,