selfrando icon indicating copy to clipboard operation
selfrando copied to clipboard

Preserve function alignment on Windows

Open ahomescu opened this issue 8 years ago • 0 comments

On Win64, the linker aligns functions to 16 bytes. Our randomization currently ignores this, at some (yet unknown) performance cost.

However, if we started adding any padding before the functions, we'd overflow the size of .text. We have two possible solutions:

  1. Add additional space in the form of additional padding, like we do on Linux.
  2. Once we fix issue #23 and can safely discard the existing padding that the linker adds in, we gain some space in .text for our own alignment. In most cases, this should give us enough space for our padding.

ahomescu avatar Feb 17 '17 22:02 ahomescu