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

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 07:07:54 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL276745: [ELF] Linkerscript: simplify DATA_SEGMENT_ALIGN evaluation (authored by grimar).

Changed prior to commit:
  https://reviews.llvm.org/D22807?vs=65509&id=65510#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D22807

Files:
  lld/trunk/ELF/LinkerScript.cpp
  lld/trunk/test/ELF/linkerscript/linkerscript-locationcounter.s

Index: lld/trunk/ELF/LinkerScript.cpp
===================================================================
--- lld/trunk/ELF/LinkerScript.cpp
+++ lld/trunk/ELF/LinkerScript.cpp
@@ -813,7 +813,7 @@
     expect(")");
     return [=](uint64_t Dot) -> uint64_t {
       uint64_t Val = E(Dot);
-      return alignTo(Dot, Val) + (Dot & (Val - 1));
+      return alignTo(Dot, Val);
     };
   }
   if (Tok == "DATA_SEGMENT_END") {
Index: lld/trunk/test/ELF/linkerscript/linkerscript-locationcounter.s
===================================================================
--- lld/trunk/test/ELF/linkerscript/linkerscript-locationcounter.s
+++ lld/trunk/test/ELF/linkerscript/linkerscript-locationcounter.s
@@ -288,7 +288,7 @@
 # CHECK-NEXT:   Flags [
 # CHECK-NEXT:     SHF_ALLOC
 # CHECK-NEXT:   ]
-# CHECK-NEXT:   Address: 0x26008
+# CHECK-NEXT:   Address: 0x26000
 # CHECK-NEXT:   Offset:
 # CHECK-NEXT:   Size:
 # CHECK-NEXT:   Link:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22807.65510.patch
Type: text/x-patch
Size: 927 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160726/fb4862fb/attachment.bin>


More information about the llvm-commits mailing list