Fix a bug in llvm-objdump’s -private-headers for 32-bit Mach-O files

printing the section header.  And add some tests for this for 32-bit files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224302 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kevin Enderby
2014-12-16 01:14:45 +00:00
parent 6f059afde6
commit c981753745
2 changed files with 337 additions and 1 deletions

View File

@@ -3696,7 +3696,7 @@ static void PrintLoadCommands(const MachOObjectFile *Obj, uint32_t ncmds,
SLC.initprot, SLC.nsects, SLC.flags, Buf.size(),
verbose);
for (unsigned j = 0; j < SLC.nsects; j++) {
MachO::section_64 S = Obj->getSection64(Command, j);
MachO::section S = Obj->getSection(Command, j);
PrintSection(S.sectname, S.segname, S.addr, S.size, S.offset, S.align,
S.reloff, S.nreloc, S.flags, S.reserved1, S.reserved2,
SLC.cmd, sg_segname, filetype, Buf.size(), verbose);