[PATCH] D30886: [ELF] Pad x86 executable sections with 0xcc int3 instructions
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 14 08:42:41 PDT 2017
jhenderson marked 5 inline comments as done.
jhenderson added inline comments.
================
Comment at: ELF/OutputSections.cpp:241
Loc = Buf;
if (uint32_t Filler = Script<ELFT>::X->getFiller(this->Name))
fill(Buf, this->Size, Filler);
----------------
grimar wrote:
> I do not think that works perfect.
> That will work wrong if linkerscript sets filler to 0x00 explicitly:
> ```
> .text: { *(.text*) }=0x00
> ```
> In that case it still will fill gaps fith 0xcc, what is not correct.
> I had to use llvm::Optional in D30901 for Filler member to fix that.
>
> Though I am not sure how much this case is real, so please
> just check other reviewers opinion about this.
Thanks, good spot.
https://reviews.llvm.org/D30886
More information about the llvm-commits
mailing list