[PATCH] D44943: Fill the last page of each executable section with 0xcc or equivalent.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 28 19:54:31 PDT 2018
ruiu added inline comments.
================
Comment at: lld/ELF/Writer.cpp:2211
+ continue;
+ fillTrap(Buf + alignDown(Sec->Offset + Sec->Size, Target->PageSize));
+ }
----------------
espindola wrote:
> Iterating over OutputSections seems like a good idea, but couldn't this fill just the area between two sections?
We can. The reason why I'm doing this is because this way, trap instructions are always 4 byte aligned even if the last segment is not 4 byte aligned. But I can fix it some way.
https://reviews.llvm.org/D44943
More information about the llvm-commits
mailing list