From ef8581479e58fe092178a9727f373a61b690a8df Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 13 Dec 2012 06:36:18 +0000 Subject: Revert "Add a funciton to get the segment name of a section." This reverts commit r170095 since it appears to be breaking the bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170105 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-objdump/MachODump.cpp | 8 +------- tools/llvm-objdump/llvm-objdump.cpp | 14 +++----------- 2 files changed, 4 insertions(+), 18 deletions(-) (limited to 'tools/llvm-objdump') diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp index c324ff13a6..3a350382ae 100644 --- a/tools/llvm-objdump/MachODump.cpp +++ b/tools/llvm-objdump/MachODump.cpp @@ -334,15 +334,9 @@ void llvm::DisassembleInputMachO(StringRef Filename) { for (unsigned SectIdx = 0; SectIdx != Sections.size(); SectIdx++) { StringRef SectName; if (Sections[SectIdx].getName(SectName) || - SectName != "__text") + SectName.compare("__TEXT,__text")) continue; // Skip non-text sections - StringRef SegmentName; - DataRefImpl DR = Sections[SectIdx].getRawDataRefImpl(); - if (MachOOF->getSectionFinalSegmentName(DR, SegmentName) || - SegmentName != "__TEXT") - continue; - // Insert the functions from the function starts segment into our map. uint64_t VMAddr; Sections[SectIdx].getAddress(VMAddr); diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp index 9edcae8d6b..2838a2a2b3 100644 --- a/tools/llvm-objdump/llvm-objdump.cpp +++ b/tools/llvm-objdump/llvm-objdump.cpp @@ -28,7 +28,6 @@ #include "llvm/MC/MCSubtargetInfo.h" #include "llvm/Object/Archive.h" #include "llvm/Object/COFF.h" -#include "llvm/Object/MachO.h" #include "llvm/Object/ObjectFile.h" #include "llvm/Support/Casting.h" #include "llvm/Support/CommandLine.h" @@ -73,9 +72,9 @@ static cl::opt SymbolTable("t", cl::desc("Display the symbol table")); static cl::opt -MachOOpt("macho", cl::desc("Use MachO specific object file parser")); +MachO("macho", cl::desc("Use MachO specific object file parser")); static cl::alias -MachOm("m", cl::desc("Alias for --macho"), cl::aliasopt(MachOOpt)); +MachOm("m", cl::desc("Alias for --macho"), cl::aliasopt(MachO)); cl::opt llvm::TripleName("triple", cl::desc("Target triple to disassemble for, " @@ -568,13 +567,6 @@ static void PrintSymbolTable(const ObjectFile *o) { else if (Section == o->end_sections()) outs() << "*UND*"; else { - if (const MachOObjectFile *MachO = dyn_cast(o)) { - StringRef SegmentName; - DataRefImpl DR = Section->getRawDataRefImpl(); - if (error(MachO->getSectionFinalSegmentName(DR, SegmentName))) - SegmentName = ""; - outs() << SegmentName << ","; - } StringRef SectionName; if (error(Section->getName(SectionName))) SectionName = ""; @@ -648,7 +640,7 @@ static void DumpInput(StringRef file) { return; } - if (MachOOpt && Disassemble) { + if (MachO && Disassemble) { DisassembleInputMachO(file); return; } -- cgit v1.2.3-18-g5258