[PATCH] D15423: [ELF] - Place RW sections that go after relro to another memory page.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 23 00:55:35 PST 2015
grimar added a comment.
In http://reviews.llvm.org/D15423#315938, @rafael wrote:
> What do you think of the attached variation?
Works for me. btw, updateRelro() in variation does not need Sec argument then.
template <class ELFT>
void Writer<ELFT>::updateRelro(Elf_Phdr *Cur, Elf_Phdr *GnuRelroPhdr,
OutputSectionBase<ELFT> *Sec, uintX_t VA) {
if (!GnuRelroPhdr->p_type)
setPhdr(GnuRelroPhdr, PT_GNU_RELRO, PF_R, Cur->p_offset, Cur->p_vaddr,
VA - Cur->p_vaddr, 1 /*p_align*/);
GnuRelroPhdr->p_filesz = VA - Cur->p_vaddr;
GnuRelroPhdr->p_memsz = VA - Cur->p_vaddr;
}
http://reviews.llvm.org/D15423
More information about the llvm-commits
mailing list