summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2013-01-18 01:26:07 +0000
committerDaniel Dunbar <daniel@zuster.org>2013-01-18 01:26:07 +0000
commiteec0f32eea42810ace9a106d671dbe5e1f1d0df7 (patch)
tree40621e1adccbb5623070d9cdc08dee7648afcbe3 /llvm/lib/Object
parent16004b832422e5493de1d54f225eaed215b0526c (diff)
downloadbcm5719-llvm-eec0f32eea42810ace9a106d671dbe5e1f1d0df7.tar.gz
bcm5719-llvm-eec0f32eea42810ace9a106d671dbe5e1f1d0df7.zip
[MC/Mach-O] Add support for linker options in Mach-O files.
llvm-svn: 172779
Diffstat (limited to 'llvm/lib/Object')
-rw-r--r--llvm/lib/Object/MachOObject.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Object/MachOObject.cpp b/llvm/lib/Object/MachOObject.cpp
index 529bdf97e59..c9c341a207c 100644
--- a/llvm/lib/Object/MachOObject.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud