[PATCH] D131961: [llvm-objdump] Support dumping segment information in -chained_fixups
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 16 08:06:17 PDT 2022
thakis added a comment.
https://buildkite.com/llvm-project/premerge-checks/builds/108031#0182a6ff-11e6-458e-baee-b8afd9d5669b I wonder if presubmit can't handle binary files well. Maybe presubmit just llvm/test/tools/llvm-objdump/MachO/Inputs/chained-fixups.macho-x86_64 and rebase this, to see if presubmit likes it more then.
================
Comment at: llvm/include/llvm/BinaryFormat/MachO.h:2091
+inline void swapStruct(dyld_chained_starts_in_image &C) {
+ sys::swapByteOrder(C.seg_count);
+}
----------------
BertalanD wrote:
> thakis wrote:
> > Do these have to swap the variably-sized tail too?
> That's not possible because `getStructOrErr<T>` only copies `sizeof(T)` bytes of data. We manually swap the tail elements when reading them in `getChainedFixupsSegments`.
Maybe add a comment to that end.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131961/new/
https://reviews.llvm.org/D131961
More information about the llvm-commits
mailing list