[PATCH] D87199: [lld-macho] Implement support for PIC

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 22:58:13 PDT 2020


smeenai added inline comments.


================
Comment at: lld/MachO/Writer.cpp:350-352
+        assert(r.referent.is<InputSection *>());
+        if (!r.pcrel)
+          in.rebase->addEntry(isec, r.offset);
----------------
gkm wrote:
> Without checking godbolt, I boldly assume that the computation for the string compare will be hoisted out of the inner loop. Please add a testcase for mixing `-pie` and compact unwind.
There's gonna be lots of relocations, so it's probably worth confirming that the hoisting happens :)

The section comparison seems fine for now, but it also seems a bit janky. Is there any long-term redesign we could do here to make it cleaner? We should add a TODO somewhere if so to keep track of it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87199



More information about the llvm-commits mailing list