[PATCH] D131961: [llvm-objdump] Support dumping segment information in -chained_fixups
Daniel Bertalan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 16 06:08:20 PDT 2022
BertalanD created this revision.
BertalanD added reviewers: thakis, MaskRay.
Herald added subscribers: StephenFan, rupprecht, hiraditya.
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 commit adds the definitions for `dyld_chained_starts_in_image`,
`dyld_chained_starts_in_segment`, and related enums. Dumping their
contents is possible via the -chained_fixups flag of llvm-otool.
The chained-fixups.yaml test was changed to cover bindings/rebases, as
well as weak imports, weak symbols and flat namespace symbols. Now that
we have actual fixup entries, the __DATA segment contains data that
would need to be hexdumped in YAML. We also test empty pages (to look
for the "DYLD_CHAINED_PTR_START_NONE" annotation, so the YAML would end
up quite large. So instead, this commit includes a 13 KB binary input.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D131961
Files:
llvm/include/llvm/BinaryFormat/MachO.h
llvm/include/llvm/Object/MachO.h
llvm/lib/Object/MachOObjectFile.cpp
llvm/test/tools/llvm-objdump/MachO/Inputs/chained-fixups.macho-x86_64
llvm/test/tools/llvm-objdump/MachO/chained-fixups.test
llvm/test/tools/llvm-objdump/MachO/chained-fixups.yaml
llvm/tools/llvm-objdump/MachODump.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131961.452977.patch
Type: text/x-patch
Size: 22564 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220816/2bcc9f34/attachment.bin>
More information about the llvm-commits
mailing list