[PATCH] D118903: [lld-macho] Have relocation address included in range-check error message

Roger Kim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 25 12:52:12 PST 2022


Roger added inline comments.


================
Comment at: lld/MachO/Arch/ARM64Common.h:109-111
+  encodePage21(&buf32[0], {&sym, "stub"}, stubCode[0],
+               pageBits(lazyPointerVA) - pcPageBits);
+  encodePageOff12(&buf32[1], stubCode[1], lazyPointerVA);
----------------
I'm not sure which way is better. Is there a reason why you didn't use pointer arithmetic here and elsewhere? I'm wondering if the current code performs a dereferencing + address of operations unnecessarily (or if that gets optimized out). It's not a big deal and either way is fine with me but I just wanted to ask.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118903



More information about the llvm-commits mailing list