[PATCH] D30886: [ELF] Pad x86 executable sections with 0xcc int3 instructions

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 06:29:37 PDT 2017


hfinkel added inline comments.


================
Comment at: ELF/Target.h:102
+
+  uint32_t DefaultExecutableFill = 0;
 };
----------------
hfinkel wrote:
> Making this a uint32_t implies (at least to me) that it might make sense for the value to be something other than a single repeated byte. Does it make sense for it to be something other than that?
> 
Never mind; the value needs to be some multiple of the length of the trap instruction, or similar, which is likely uses the smallest available encoding size (whatever that happens to be for the target architecture). So long as we never need to fill in regions smaller than that, then there should be no ambiguity.


https://reviews.llvm.org/D30886





More information about the llvm-commits mailing list