[PATCH] D22813: [ELF] Linkerscript: implement DATA_SEGMENT_RELRO_END.

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


grimar added a comment.

Sorry I committed this with the fixes below. Was it LGTM ? If not I can revert.


================
Comment at: ELF/LinkerScript.cpp:826
@@ +825,3 @@
+  if (Tok == "DATA_SEGMENT_RELRO_END") {
+    expect("(");
+    next();
----------------
ruiu wrote:
> Add a short comment here saying that our implementation is different from GNU.
Done.

================
Comment at: ELF/LinkerScript.cpp:829
@@ +828,3 @@
+    expect(",");
+    next();
+    expect(")");
----------------
ruiu wrote:
> This should be `readExpr()`.
Done.

================
Comment at: ELF/LinkerScript.cpp:831-833
@@ +830,5 @@
+    expect(")");
+    if (!Config->ZRelro)
+      return [](uint64_t Dot) { return Dot; };
+    return [](uint64_t Dot) { return alignTo(Dot, Target->PageSize); };
+  }
----------------
ruiu wrote:
> Our semantics is different anyways, so we don't even have to look at Config->ZRelro. I'd always align to Target->PageSize.
Hmm. Ok, since we have -z relro by default anyways.


Repository:
  rL LLVM

https://reviews.llvm.org/D22813





More information about the llvm-commits mailing list