From 9942acab0a42755637a682308c8262b88cbbb9e9 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 30 Aug 2011 18:33:37 +0000 Subject: Teach macho-dump how to dump linkedit_data load commands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138807 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Object/MachOObject.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/Object/MachOObject.cpp') diff --git a/lib/Object/MachOObject.cpp b/lib/Object/MachOObject.cpp index 9890febfb6..339b12043a 100644 --- a/lib/Object/MachOObject.cpp +++ b/lib/Object/MachOObject.cpp @@ -243,6 +243,18 @@ void MachOObject::ReadDysymtabLoadCommand(const LoadCommandInfo &LCI, ReadInMemoryStruct(*this, Buffer->getBuffer(), LCI.Offset, Res); } +template<> +void SwapStruct(macho::LinkeditDataLoadCommand &Value) { + SwapValue(Value.Type); + SwapValue(Value.Size); + SwapValue(Value.DataOffset); + SwapValue(Value.DataSize); +} +void MachOObject::ReadLinkeditDataLoadCommand(const LoadCommandInfo &LCI, + InMemoryStruct &Res) const { + ReadInMemoryStruct(*this, Buffer->getBuffer(), LCI.Offset, Res); +} + template<> void SwapStruct(macho::IndirectSymbolTableEntry &Value) { SwapValue(Value.Index); -- cgit v1.2.3-18-g5258