Fix a bug in llvm-objdump for -private-headers printing the LC_CODE_SIGNATURE Mach-O load command.

rdar://25985653

llvm-svn: 267940
This commit is contained in:
Kevin Enderby 2016-04-28 21:07:20 +00:00
parent bf90d5a3b3
commit 1be37a3522
3 changed files with 8 additions and 1 deletions

Binary file not shown.

View File

@ -21,6 +21,8 @@
// RUN: | FileCheck %s -check-prefix=FATi386
// RUN: llvm-objdump -p -non-verbose %p/Inputs/hello.obj.macho-x86_64 \
// RUN: | FileCheck %s -check-prefix=NON_VERBOSE
// RUN: llvm-objdump -p %p/Inputs/codesig.macho-x86_64 \
// RUN: | FileCheck %s -check-prefix=CODESIG
CHECK: Mach header
CHECK: magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
@ -537,3 +539,8 @@ NON_VERBOSE: extreloff 0
NON_VERBOSE: nextrel 0
NON_VERBOSE: locreloff 0
NON_VERBOSE: nlocrel 0
CODESIG: cmd LC_CODE_SIGNATURE
CODESIG: cmdsize 16
CODESIG: dataoff 8496
CODESIG: datasize 64

View File

@ -8361,7 +8361,7 @@ static void PrintDylibCommand(MachO::dylib_command dl, const char *Ptr) {
static void PrintLinkEditDataCommand(MachO::linkedit_data_command ld,
uint32_t object_size) {
if (ld.cmd == MachO::LC_CODE_SIGNATURE)
outs() << " cmd LC_FUNCTION_STARTS\n";
outs() << " cmd LC_CODE_SIGNATURE\n";
else if (ld.cmd == MachO::LC_SEGMENT_SPLIT_INFO)
outs() << " cmd LC_SEGMENT_SPLIT_INFO\n";
else if (ld.cmd == MachO::LC_FUNCTION_STARTS)