[PATCH] D22813: [ELF] Linkerscript: implement DATA_SEGMENT_RELRO_END.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 26 10:35:42 PDT 2016
ruiu added a comment.
Okay. This is a hairy feature which we probably don't want to fully support. Don't know how to communicate to users that our linker script semantics is different for this function. I was thinking of a warning message, but it can be too noisy. Maybe we should add a note in the documentation?
Anyways, please leave a comment so that we won't forget the fact that the feature is different from what GNU implements.
================
Comment at: ELF/LinkerScript.cpp:826
@@ +825,3 @@
+ if (Tok == "DATA_SEGMENT_RELRO_END") {
+ expect("(");
+ next();
----------------
Add a short comment here saying that our implementation is different from GNU.
================
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); };
+ }
----------------
Our semantics is different anyways, so we don't even have to look at Config->ZRelro. I'd always align to Target->PageSize.
https://reviews.llvm.org/D22813
More information about the llvm-commits
mailing list