summaryrefslogtreecommitdiffstats
path: root/tools/llvm-readobj
diff options
context:
space:
mode:
authorCharles Davis <cdavis5x@gmail.com>2013-08-27 05:00:43 +0000
committerCharles Davis <cdavis5x@gmail.com>2013-08-27 05:00:43 +0000
commit9c3dd1b0d1e96ef408b68da3b06c6ebd6c943601 (patch)
tree101d9a713b5d27848e80a81ac47fd52656445110 /tools/llvm-readobj
parentbf778d0546a4d8814339d946ca5c7e52291cc00c (diff)
downloadexternal_llvm-9c3dd1b0d1e96ef408b68da3b06c6ebd6c943601.zip
external_llvm-9c3dd1b0d1e96ef408b68da3b06c6ebd6c943601.tar.gz
external_llvm-9c3dd1b0d1e96ef408b68da3b06c6ebd6c943601.tar.bz2
Move everything depending on Object/MachOFormat.h over to Support/MachO.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189315 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-readobj')
-rw-r--r--tools/llvm-readobj/MachODumper.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/tools/llvm-readobj/MachODumper.cpp b/tools/llvm-readobj/MachODumper.cpp
index 8df6fd6..e27a58a 100644
--- a/tools/llvm-readobj/MachODumper.cpp
+++ b/tools/llvm-readobj/MachODumper.cpp
@@ -166,28 +166,28 @@ static void getSection(const MachOObjectFile *Obj,
DataRefImpl Sec,
MachOSection &Section) {
if (!Obj->is64Bit()) {
- macho::Section Sect = Obj->getSection(Sec);
- Section.Address = Sect.Address;
- Section.Size = Sect.Size;
- Section.Offset = Sect.Offset;
- Section.Alignment = Sect.Align;
- Section.RelocationTableOffset = Sect.RelocationTableOffset;
- Section.NumRelocationTableEntries = Sect.NumRelocationTableEntries;
- Section.Flags = Sect.Flags;
- Section.Reserved1 = Sect.Reserved1;
- Section.Reserved2 = Sect.Reserved2;
+ MachO::section Sect = Obj->getSection(Sec);
+ Section.Address = Sect.addr;
+ Section.Size = Sect.size;
+ Section.Offset = Sect.offset;
+ Section.Alignment = Sect.align;
+ Section.RelocationTableOffset = Sect.reloff;
+ Section.NumRelocationTableEntries = Sect.nreloc;
+ Section.Flags = Sect.flags;
+ Section.Reserved1 = Sect.reserved1;
+ Section.Reserved2 = Sect.reserved2;
return;
}
- macho::Section64 Sect = Obj->getSection64(Sec);
- Section.Address = Sect.Address;
- Section.Size = Sect.Size;
- Section.Offset = Sect.Offset;
- Section.Alignment = Sect.Align;
- Section.RelocationTableOffset = Sect.RelocationTableOffset;
- Section.NumRelocationTableEntries = Sect.NumRelocationTableEntries;
- Section.Flags = Sect.Flags;
- Section.Reserved1 = Sect.Reserved1;
- Section.Reserved2 = Sect.Reserved2;
+ MachO::section_64 Sect = Obj->getSection64(Sec);
+ Section.Address = Sect.addr;
+ Section.Size = Sect.size;
+ Section.Offset = Sect.offset;
+ Section.Alignment = Sect.align;
+ Section.RelocationTableOffset = Sect.reloff;
+ Section.NumRelocationTableEntries = Sect.nreloc;
+ Section.Flags = Sect.flags;
+ Section.Reserved1 = Sect.reserved1;
+ Section.Reserved2 = Sect.reserved2;
}
@@ -195,20 +195,20 @@ static void getSymbol(const MachOObjectFile *Obj,
DataRefImpl DRI,
MachOSymbol &Symbol) {
if (!Obj->is64Bit()) {
- macho::SymbolTableEntry Entry = Obj->getSymbolTableEntry(DRI);
- Symbol.StringIndex = Entry.StringIndex;
- Symbol.Type = Entry.Type;
- Symbol.SectionIndex = Entry.SectionIndex;
- Symbol.Flags = Entry.Flags;
- Symbol.Value = Entry.Value;
+ MachO::nlist Entry = Obj->getSymbolTableEntry(DRI);
+ Symbol.StringIndex = Entry.n_strx;
+ Symbol.Type = Entry.n_type;
+ Symbol.SectionIndex = Entry.n_sect;
+ Symbol.Flags = Entry.n_desc;
+ Symbol.Value = Entry.n_value;
return;
}
- macho::Symbol64TableEntry Entry = Obj->getSymbol64TableEntry(DRI);
- Symbol.StringIndex = Entry.StringIndex;
- Symbol.Type = Entry.Type;
- Symbol.SectionIndex = Entry.SectionIndex;
- Symbol.Flags = Entry.Flags;
- Symbol.Value = Entry.Value;
+ MachO::nlist_64 Entry = Obj->getSymbol64TableEntry(DRI);
+ Symbol.StringIndex = Entry.n_strx;
+ Symbol.Type = Entry.n_type;
+ Symbol.SectionIndex = Entry.n_sect;
+ Symbol.Flags = Entry.n_desc;
+ Symbol.Value = Entry.n_value;
}
void MachODumper::printFileHeaders() {
@@ -349,7 +349,7 @@ void MachODumper::printRelocation(const MachOObjectFile *Obj,
return;
DataRefImpl DR = RelI->getRawDataRefImpl();
- macho::RelocationEntry RE = Obj->getRelocation(DR);
+ MachO::any_relocation_info RE = Obj->getRelocation(DR);
bool IsScattered = Obj->isRelocationScattered(RE);
if (opts::ExpandRelocs) {