diff options
author | Michael Brown <mcb30@ipxe.org> | 2023-11-22 23:05:39 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2023-11-23 13:29:34 +0000 |
commit | 3d8a614657e68fb6cb7241397bc14cb5b9a7c0b8 (patch) | |
tree | 09874ba9b1c04752fe6a1a07ed85a69db9ae40fc | |
parent | a9e89787d08df46daee85a871ba256daf84c6f34 (diff) | |
download | ipxe-3d8a614657e68fb6cb7241397bc14cb5b9a7c0b8.tar.gz |
[efi] Mark PE images as large address aware
The images generated by elf2efi can be loaded anywhere in the address
space, and are not limited to the low 2GB.
Indicate this by setting the "large address aware" flag within the PE
header, for compatibility with EFI images generated by the EDK2 build
process. (The EDK2 PE loader does not ever check this flag, and it is
unlikely that any other EFI PE loader ever does so, but we may as well
report it accurately.)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r-- | src/util/elf2efi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c index f4d591d1e..b13ff43eb 100644 --- a/src/util/elf2efi.c +++ b/src/util/elf2efi.c @@ -215,6 +215,7 @@ static struct pe_header efi_pe_header = { DataDirectory[0] ) ) ), .Characteristics = ( EFI_IMAGE_FILE_DLL | EFI_IMAGE_FILE_MACHINE | + EFI_IMAGE_FILE_LARGE_ADDRESS_AWARE| EFI_IMAGE_FILE_EXECUTABLE_IMAGE ), }, .OptionalHeader = { |