[PATCH] D22572: Create thunks before regular relocation scan

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 20 08:55:40 PDT 2016


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

LGTM


================
Comment at: ELF/Relocations.cpp:552
@@ +551,3 @@
+
+    uintX_t Offset;
+    if (PieceI != PieceE) {
----------------
Please add a comment for this block of code.

================
Comment at: ELF/Relocations.cpp:557
@@ +556,3 @@
+        continue;
+      Offset = PieceI->OutputOff + (RI.r_offset - PieceI->InputOff);
+      assert(Offset == C.getOffset(RI.r_offset));
----------------
You don't need ().

================
Comment at: ELF/Relocations.cpp:693
@@ +692,3 @@
+  for (auto I = Rels.begin(), E = Rels.end(); I != E; ++I) {
+    const RelTy &RI = *I;
+    SymbolBody &Body = File.getRelocTargetSym(RI);
----------------
RI is short for relocation iterator, so `Rel` would be a better name.


https://reviews.llvm.org/D22572





More information about the llvm-commits mailing list