[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 06:23:30 PDT 2022


thakis accepted this revision.
thakis added a comment.
This revision is now accepted and ready to land.

Thanks!



================
Comment at: llvm/include/llvm/BinaryFormat/MachO.h:2091
+inline void swapStruct(dyld_chained_starts_in_image &C) {
+  sys::swapByteOrder(C.seg_count);
+}
----------------
Do these have to swap the variably-sized tail too?


================
Comment at: llvm/lib/Object/MachOObjectFile.cpp:4780
-  // If the load command is present but the data offset has been zeroed out,
-  // as is the case for dylib stubs, return None (no error).
   uint64_t CFHeaderOffset = DyldChainedFixups.dataoff;
----------------
keep comment?


================
Comment at: llvm/lib/Object/MachOObjectFile.cpp:4792
+
+  MachO::linkedit_data_command DyldChainedFixups = **CFOrErr;
+
----------------
nit: maybe const ref


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131961/new/

https://reviews.llvm.org/D131961



More information about the llvm-commits mailing list