Revert "Debug info: On ARM ensure that the data sections come before the"
[oota-llvm.git] / lib / MC / MCObjectSymbolizer.cpp
index a32e2aeb824071fee053d249da67a5e7ed0215f3..cdf743e6bbb21240af08ebfc7e0b4554951f4ca1 100644 (file)
@@ -14,8 +14,8 @@
 #include "llvm/MC/MCInst.h"
 #include "llvm/MC/MCRelocationInfo.h"
 #include "llvm/MC/MCSymbol.h"
-#include "llvm/Object/MachO.h"
 #include "llvm/Object/ELFObjectFile.h"
+#include "llvm/Object/MachO.h"
 #include "llvm/Support/raw_ostream.h"
 #include <algorithm>
 
@@ -60,13 +60,13 @@ MCMachObjectSymbolizer(MCContext &Ctx, OwningPtr<MCRelocationInfo> &RelInfo,
     if (Name == "__stubs") {
       SectionRef StubsSec = *SI;
       if (MOOF->is64Bit()) {
-        macho::Section64 S = MOOF->getSection64(StubsSec.getRawDataRefImpl());
-        StubsIndSymIndex = S.Reserved1;
-        StubSize = S.Reserved2;
+        MachO::section_64 S = MOOF->getSection64(StubsSec.getRawDataRefImpl());
+        StubsIndSymIndex = S.reserved1;
+        StubSize = S.reserved2;
       } else {
-        macho::Section S = MOOF->getSection(StubsSec.getRawDataRefImpl());
-        StubsIndSymIndex = S.Reserved1;
-        StubSize = S.Reserved2;
+        MachO::section S = MOOF->getSection(StubsSec.getRawDataRefImpl());
+        StubsIndSymIndex = S.reserved1;
+        StubSize = S.reserved2;
       }
       assert(StubSize && "Mach-O stub entry size can't be zero!");
       StubsSec.getAddress(StubsStart);
@@ -86,9 +86,8 @@ StringRef MCMachObjectSymbolizer::findExternalFunctionAt(uint64_t Addr) {
   if (StubIdx >= StubsCount)
     return StringRef();
 
-  macho::IndirectSymbolTableEntry ISTE =
+  uint32_t SymtabIdx =
     MOOF->getIndirectSymbolTableEntry(MOOF->getDysymtabLoadCommand(), StubIdx);
-  uint32_t SymtabIdx = ISTE.Index;
 
   StringRef SymName;
   symbol_iterator SI = MOOF->begin_symbols();