From 76a8bff24173c8018fff9cfca0babd5f9999adae Mon Sep 17 00:00:00 2001 From: Mate Kukri Date: Mon, 11 Aug 2025 09:59:31 +0100 Subject: [PATCH] Do not set NX_COMPAT flag until linux.c is actually NX compatible --- elf2efi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elf2efi.py b/elf2efi.py index d3ef5907..85cbdeaa 100755 --- a/elf2efi.py +++ b/elf2efi.py @@ -627,8 +627,8 @@ def elf2efi(args: argparse.Namespace): opt.Magic = 0x10B if elf.elfclass == 32 else 0x20B opt.SizeOfImage = next_section_address(sections) - # DYNAMIC_BASE|NX_COMPAT|HIGH_ENTROPY_VA or DYNAMIC_BASE|NX_COMPAT - opt.DllCharacteristics = 0x160 if elf.elfclass == 64 else 0x140 + # DYNAMIC_BASE|HIGH_ENTROPY_VA or DYNAMIC_BASE + opt.DllCharacteristics = 0x60 if elf.elfclass == 64 else 0x40 # These values are taken from a natively built PE binary (although, unused by EDK2/EFI). opt.SizeOfStackReserve = 0x100000