mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-16 00:17:32 +00:00
Update the comments for the macho-invalid-zero-ncmds test and fix
llvm-objdump when printing the Mach Header to print the unknown cputype and cpusubtype fields as decimal instead of not printing them at all. And change the test to check for that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258826 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b4878ed1be
commit
ce2bf8c364
@ -1,5 +1,9 @@
|
||||
// No crash, might not be totally invalid
|
||||
RUN: llvm-objdump -private-headers %p/Inputs/macho-invalid-zero-ncmds
|
||||
// An odd Mach-O file, with just a mach header with all but the magic field
|
||||
// and filetype zeros. The cputype and cpusubtype fields being zero are invalid,
|
||||
// but that does not mater for the most part to display some of the contents.
|
||||
RUN: llvm-objdump -private-headers %p/Inputs/macho-invalid-zero-ncmds -macho \
|
||||
RUN: | FileCheck -check-prefix ZERO-NCMDS %s
|
||||
ZERO-NCMDS: MH_MAGIC_64 0 0 0x00 OBJECT 0 0 0x00000000
|
||||
|
||||
RUN: not llvm-objdump -private-headers %p/Inputs/macho64-invalid-incomplete-load-command 2>&1 \
|
||||
RUN: | FileCheck -check-prefix INCOMPLETE-LOADC %s
|
||||
|
@ -6893,6 +6893,10 @@ static void PrintMachHeader(uint32_t magic, uint32_t cputype,
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
outs() << format(" %7d", cputype);
|
||||
outs() << format(" %10d", cpusubtype & ~MachO::CPU_SUBTYPE_MASK);
|
||||
break;
|
||||
}
|
||||
if ((cpusubtype & MachO::CPU_SUBTYPE_MASK) == MachO::CPU_SUBTYPE_LIB64) {
|
||||
outs() << " LIB64";
|
||||
|
Loading…
Reference in New Issue
Block a user