Skip to content

Commit

Permalink
[efi] Set NXCOMPAT bit in PE header
Browse files Browse the repository at this point in the history
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 <mbrown@fensystems.co.uk>
  • Loading branch information
mcb30 committed Aug 16, 2023
1 parent 1398b3e commit e0b67a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/prefix.S
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ opt_header:
.long _prefix_len /* SizeOfHeaders */
.long 0 /* Checksum */
.word 0x0a /* Subsystem */
.word 0 /* DllCharacteristics */
.word 0x0100 /* DllCharacteristics */
#if __x86_64__
.quad 0 /* SizeOfStackReserve */
.quad 0 /* SizeOfStackCommit */
Expand Down

0 comments on commit e0b67a2

Please sign in to comment.