[PATCH] D132036: [llvm-objdump] Add -dyld_info to llvm-otool

Daniel Bertalan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 17 08:53:51 PDT 2022


BertalanD created this revision.
BertalanD added reviewers: thakis, MaskRay.
Herald added subscribers: StephenFan, pengfei, rupprecht, hiraditya, kristof.beyls.
Herald added a reviewer: jhenderson.
Herald added a project: All.
BertalanD requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This option outputs the location, encoded value and target of chained
fixups, using the same format as `otool -dyld_info`.

This initial implementation only supports the DYLD_CHAINED_PTR_64 and
DYLD_CHAINED_PTR_64_OFFSET pointer encodings, which are used in x86_64
and arm64 userspace binaries.

When Apple's effort to upstream their chained fixups code continues,
we'll replace this code with the then-upstreamed code. But we need
something in the meantime for testing ld64.lld's chained fixups code.


https://reviews.llvm.org/D132036

Files:
  llvm/include/llvm/BinaryFormat/MachO.h
  llvm/include/llvm/Object/MachO.h
  llvm/lib/Object/MachOObjectFile.cpp
  llvm/test/tools/llvm-objdump/MachO/dyld_info.test
  llvm/tools/llvm-objdump/MachODump.cpp
  llvm/tools/llvm-objdump/OtoolOpts.td
  llvm/tools/llvm-objdump/llvm-objdump.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132036.453299.patch
Type: text/x-patch
Size: 17301 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220817/b786c13a/attachment.bin>


More information about the llvm-commits mailing list