[PATCH] D132560: [lld-macho] Add initial support for chained fixups

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 19 12:00:01 PDT 2022


int3 added inline comments.


================
Comment at: lld/MachO/SyntheticSections.cpp:2157-2158
+  auto curOffset = [&buf, &header]() {
+    return reinterpret_cast<uintptr_t>(buf) -
+           reinterpret_cast<uintptr_t>(header);
+  };
----------------
I think `return buf - reinterpret_cast<uint8_t *>(header)` should work too and is a bit more succinct


================
Comment at: lld/MachO/SyntheticSections.h:276
+// Symbols are always bound eagerly when chained fixups are used. In that case,
+// StubSection contains indirect jumps to addresses stored in the GotSection.
+// The GOT directly contains the fixup entries, which will be replaced by the
----------------



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

https://reviews.llvm.org/D132560



More information about the llvm-commits mailing list