diff options
author | Daniel Dunbar <daniel@zuster.org> | 2013-01-18 01:26:07 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2013-01-18 01:26:07 +0000 |
commit | a94c33942373cb504b6e64c95415165907a89d34 (patch) | |
tree | 6a3f25d71295add8b88e544d237edcd83c84e0de /lib/Object/MachOObject.cpp | |
parent | cddd236e8a5acb80e9a0e79dc63f6cfaa8205b86 (diff) |
[MC/Mach-O] Add support for linker options in Mach-O files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object/MachOObject.cpp')
-rw-r--r-- | lib/Object/MachOObject.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Object/MachOObject.cpp b/lib/Object/MachOObject.cpp index 529bdf97e5..c9c341a207 100644 --- a/lib/Object/MachOObject.cpp +++ b/lib/Object/MachOObject.cpp @@ -259,6 +259,17 @@ void MachOObject::ReadLinkeditDataLoadCommand(const LoadCommandInfo &LCI, } template<> +void SwapStruct(macho::LinkerOptionsLoadCommand &Value) { + SwapValue(Value.Type); + SwapValue(Value.Size); + SwapValue(Value.Count); +} +void MachOObject::ReadLinkerOptionsLoadCommand(const LoadCommandInfo &LCI, + InMemoryStruct<macho::LinkerOptionsLoadCommand> &Res) const { + ReadInMemoryStruct(*this, Buffer->getBuffer(), LCI.Offset, Res); +} + +template<> void SwapStruct(macho::IndirectSymbolTableEntry &Value) { SwapValue(Value.Index); } |