[PATCH] D22807: [ELF] Linkerscript: simplify DATA_SEGMENT_ALIGN evaluation

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 10:26:37 PDT 2016


ruiu added inline comments.

================
Comment at: lld/trunk/ELF/LinkerScript.cpp:814-816
@@ -813,5 +813,5 @@
     expect(")");
     return [=](uint64_t Dot) -> uint64_t {
       uint64_t Val = E(Dot);
-      return alignTo(Dot, Val) + (Dot & (Val - 1));
+      return alignTo(Dot, Val);
     };
----------------
So actually this can be `return [=](uint64_t Dot) { return alignTo(Dot, E(Dot)); }`.


Repository:
  rL LLVM

https://reviews.llvm.org/D22807





More information about the llvm-commits mailing list