summaryrefslogtreecommitdiffstats
path: root/src/interface/linux/linux_api.c
diff options
context:
space:
mode:
authorMichael Brown2021-07-15 16:32:31 +0200
committerMichael Brown2021-07-15 16:45:24 +0200
commitc64dfff0a93b5f967ae21339313e61baf0b7a3a0 (patch)
tree643f5c75d0269065dfd200d9c9fd6be1c73c4be2 /src/interface/linux/linux_api.c
parent[libc] Allow for externally-defined LITTLE_ENDIAN and BIG_ENDIAN constants (diff)
downloadipxe-c64dfff0a93b5f967ae21339313e61baf0b7a3a0.tar.gz
ipxe-c64dfff0a93b5f967ae21339313e61baf0b7a3a0.tar.xz
ipxe-c64dfff0a93b5f967ae21339313e61baf0b7a3a0.zip
[efi] Match signtool expectations for file alignment
As of commit f1e9e2b ("[efi] Align EFI image sections by page size"), our SectionAlignment has been increased to 4kB in order to allow for page-level memory protection to be applied by the UEFI firmware, with FileAlignment left at 32 bytes. The PE specification states that the value for FileAlignment "should be a power of 2 between 512 and 64k, inclusive", and that "if the SectionAlignment is less than the architecture's page size, then FileAlignment must match SectionAlignment". Testing shows that signtool.exe will reject binaries where FileAlignment is less than 512, unless FileAlignment is equal to SectionAlignment. This indicates a somewhat zealous interpretation of the word "should" in the PE specification. Work around this interpretation by increasing FileAlignment from 32 bytes to 512 bytes, and add explanatory comments for both FileAlignment and SectionAlignment. Debugged-by: Andreas Hammarskjöld <junior@2PintSoftware.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/linux/linux_api.c')
0 files changed, 0 insertions, 0 deletions