aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Object/MachOFormat.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-11-27 08:22:29 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-11-27 08:22:29 +0000
commit4ba1f5e0011fa0c17ff121634bf8e88270f3b52e (patch)
tree3624e0ae4221f2ec1c6b3b03dfb809fd945b9ef0 /include/llvm/Object/MachOFormat.h
parent35bf4d6d8018160557a92b86181acbcef76f86eb (diff)
macho-dump: Add support for dumping segment load commands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Object/MachOFormat.h')
-rw-r--r--include/llvm/Object/MachOFormat.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/llvm/Object/MachOFormat.h b/include/llvm/Object/MachOFormat.h
index 87e4f4241c..c0c61e1a83 100644
--- a/include/llvm/Object/MachOFormat.h
+++ b/include/llvm/Object/MachOFormat.h
@@ -146,6 +146,39 @@ namespace macho {
uint32_t Size;
};
+ /// @name Load Command Structures
+ /// @{
+
+ struct SegmentLoadCommand {
+ uint32_t Type;
+ uint32_t Size;
+ char Name[16];
+ uint32_t VMAddress;
+ uint32_t VMSize;
+ uint32_t FileOffset;
+ uint32_t FileSize;
+ uint32_t MaxVMProtection;
+ uint32_t InitialVMProtection;
+ uint32_t NumSections;
+ uint32_t Flags;
+ };
+
+ struct Segment64LoadCommand {
+ uint32_t Type;
+ uint32_t Size;
+ char Name[16];
+ uint64_t VMAddress;
+ uint64_t VMSize;
+ uint64_t FileOffset;
+ uint64_t FileSize;
+ uint32_t MaxVMProtection;
+ uint32_t InitialVMProtection;
+ uint32_t NumSections;
+ uint32_t Flags;
+ };
+
+ /// @}
+
// See <mach-o/nlist.h>.
enum SymbolTypeType {
STT_Undefined = 0x00,