diff options
author | Charles Davis <cdavis5x@gmail.com> | 2013-08-27 05:38:30 +0000 |
---|---|---|
committer | Charles Davis <cdavis5x@gmail.com> | 2013-08-27 05:38:30 +0000 |
commit | 1827bd8a6c943e23b033b79d812e726667eb472f (patch) | |
tree | 4e0eec314cf4e3ed66910ee5dc39b77fd1bf086e /llvm/tools/llvm-readobj/MachODumper.cpp | |
parent | 88ab1d70bc9e2ca6f074d9edf4e1f52074348bab (diff) | |
download | llvm-1827bd8a6c943e23b033b79d812e726667eb472f.zip llvm-1827bd8a6c943e23b033b79d812e726667eb472f.tar.gz llvm-1827bd8a6c943e23b033b79d812e726667eb472f.tar.bz2 |
Revert "Fix the build broken by r189315." and "Move everything depending on Object/MachOFormat.h over to Support/MachO.h."
This reverts commits r189319 and r189315. r189315 broke some tests on what I
believe are big-endian platforms.
llvm-svn: 189321
Diffstat (limited to 'llvm/tools/llvm-readobj/MachODumper.cpp')
-rw-r--r-- | llvm/tools/llvm-readobj/MachODumper.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/llvm/tools/llvm-readobj/MachODumper.cpp b/llvm/tools/llvm-readobj/MachODumper.cpp index e27a58a..8df6fd6 100644 --- a/llvm/tools/llvm-readobj/MachODumper.cpp +++ b/llvm/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.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; + 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; return; } - 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; + 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; } @@ -195,20 +195,20 @@ static void getSymbol(const MachOObjectFile *Obj, DataRefImpl DRI, MachOSymbol &Symbol) { if (!Obj->is64Bit()) { - 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; + 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; return; } - 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; + 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; } void MachODumper::printFileHeaders() { @@ -349,7 +349,7 @@ void MachODumper::printRelocation(const MachOObjectFile *Obj, return; DataRefImpl DR = RelI->getRawDataRefImpl(); - MachO::any_relocation_info RE = Obj->getRelocation(DR); + macho::RelocationEntry RE = Obj->getRelocation(DR); bool IsScattered = Obj->isRelocationScattered(RE); if (opts::ExpandRelocs) { |