[PATCH] D44775: [ELF] - Fill executable segments with trap instructions.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 29 01:32:53 PDT 2018


grimar added inline comments.


================
Comment at: ELF/Arch/X86.cpp:446
       0xc3,                                     // 2e:   ret
+      0xcc                                      // 2f:   int3; .align 48
   };
----------------
ruiu wrote:
> grimar wrote:
> > ruiu wrote:
> > > Please remove `; .align 48` because that doesn't really explain what this code does. (Also we want to align it not to 48 but 16).
> > Actually, we want to align to `PltHeaderSize` I think, which is 48 here. Because if you align 32 to 16, you'll get
> > 32 instead of 48 and that would not work.
> That's wrong. ".align 48" doesn't mean that the size of this thingy is 48 byte. It just says that the thin that follows this thing is aligned to 48 bytes. So that comment is wrong.
Ok, seems I overthinking the meaning of "0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, // 19:   int3; .align 16" above then,
thanks for the explanation.


https://reviews.llvm.org/D44775





More information about the llvm-commits mailing list