mirror of
https://github.com/ipxe/ipxe
synced 2025-12-15 00:12:19 +03:00
[efi] Set NXCOMPAT bit in PE header
Indicate that the binary is compatible with W^X protections by setting the NXCOMPAT bit in the DllCharacteristics field of the PE header. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -225,6 +225,8 @@ static struct pe_header efi_pe_header = {
|
|||||||
.FileAlignment = EFI_FILE_ALIGN,
|
.FileAlignment = EFI_FILE_ALIGN,
|
||||||
.SizeOfImage = EFI_IMAGE_ALIGN,
|
.SizeOfImage = EFI_IMAGE_ALIGN,
|
||||||
.SizeOfHeaders = sizeof ( efi_pe_header ),
|
.SizeOfHeaders = sizeof ( efi_pe_header ),
|
||||||
|
.DllCharacteristics =
|
||||||
|
IMAGE_DLLCHARACTERISTICS_NX_COMPAT,
|
||||||
.NumberOfRvaAndSizes = NUMBER_OF_DIRECTORY_ENTRIES,
|
.NumberOfRvaAndSizes = NUMBER_OF_DIRECTORY_ENTRIES,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user