[PATCH] D106128: [lld-macho] Use DO_BIND_ADD_ADDR_IMM_SCALED for bind opcodes

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 20 04:50:42 PDT 2021


int3 accepted this revision.
int3 added a comment.

Fix looks good but can we figure out how it was happening in the first place? I would guess that we were running `optimizeOpcodes` on an empty vector, but I'm not sure how that would happen in the given test...



================
Comment at: lld/MachO/SyntheticSections.cpp:369
+  // expand it to the correct address.
+  for (i = 0; i < opcodes.size(); ++i) {
+    // It's unclear why the check needs to be less than BIND_IMMEDIATE_MASK,
----------------
I think this can be a for-range loop


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106128



More information about the llvm-commits mailing list