[PATCH] D131909: Add MachO MH_FILESET support to objdump

Pete Cooper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 11:10:45 PDT 2022


pete created this revision.
pete added a reviewer: beanz.
Herald added subscribers: rupprecht, hiraditya.
Herald added a reviewer: jhenderson.
Herald added a reviewer: MaskRay.
Herald added a project: All.
pete requested review of this revision.
Herald added subscribers: llvm-commits, StephenFan.
Herald added a project: LLVM.

On macOS, the kernel and kexts are linked in to a file known as a kernel collection.  This is a new kind of mach-o, with a filetype of MH_FILESET.

Prior to this PR, llvm-objdump would say "not an object file" if you tried to read from an MH_FILESET.  Now it understands enough to print the mach header.


https://reviews.llvm.org/D131909

Files:
  llvm/include/llvm/BinaryFormat/MachO.h
  llvm/include/llvm/BinaryFormat/Magic.h
  llvm/lib/BinaryFormat/Magic.cpp
  llvm/lib/Object/Binary.cpp
  llvm/lib/Object/ObjectFile.cpp
  llvm/lib/Object/SymbolicFile.cpp
  llvm/test/Object/AArch64/filetype-fileset.yaml
  llvm/tools/llvm-objdump/MachODump.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131909.452748.patch
Type: text/x-patch
Size: 4412 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220815/db088de0/attachment.bin>


More information about the llvm-commits mailing list