[PATCH] D15423: [ELF] - Place RW sections that go after relro to another memory page.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 10 11:47:59 PST 2015
ruiu added inline comments.
================
Comment at: ELF/Writer.cpp:847
@@ +846,3 @@
+ OutputSectionBase<ELFT> *Sec) {
+ if (!Config->ZRelro || ((Cur->p_flags & PF_W) && isRelroSection(Sec)))
+ return false;
----------------
What does this condition mean? (Particularly, why do you have to check for PF_W?)
================
Comment at: ELF/Writer.cpp:849
@@ +848,3 @@
+ return false;
+ return GnuRelroPhdr->p_type;
+}
----------------
What's the meaning of this flag?
================
Comment at: ELF/Writer.cpp:922
@@ -892,3 +921,3 @@
if (Sec->getFlags() & SHF_TLS) {
if (!TlsPhdr.p_vaddr)
----------------
Can you add new code here?
if (/* Some expression to check if the last section is in RELRO but the current one is not */) {
VA = RoundUpToAlignment(VA, Target->getPageSize());
FileOff = RoundUpToAlignment(FileOff, Target->getPageSize());
}
http://reviews.llvm.org/D15423
More information about the llvm-commits
mailing list