diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-12-23 02:16:03 +0100 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-12-29 10:51:50 +0100 |
commit | 3ec07c99d8f2f711f801c31a1d7a20573d6f15bb (patch) | |
tree | a40b20440c6b8d7042658e5215be9288a02bcc63 /arch/riscv | |
parent | c33d389c7ab5924fc7892edaf11798d644a2d824 (diff) | |
download | u-boot-3ec07c99d8f2f711f801c31a1d7a20573d6f15bb.tar.gz u-boot-3ec07c99d8f2f711f801c31a1d7a20573d6f15bb.tar.bz2 u-boot-3ec07c99d8f2f711f801c31a1d7a20573d6f15bb.zip |
efi_loader: set IMAGE_FILE_LARGE_ADDRESS_AWARE
For the 64bit EFI binaries that we create set the
IMAGE_FILE_LARGE_ADDRESS_AWARE characteristic in the PE-COFF header
to indicate that they can handle addresses above 2 GiB.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'arch/riscv')
-rw-r--r-- | arch/riscv/lib/crt0_riscv_efi.S | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/riscv/lib/crt0_riscv_efi.S b/arch/riscv/lib/crt0_riscv_efi.S index a01e08a3c6..793eefdd88 100644 --- a/arch/riscv/lib/crt0_riscv_efi.S +++ b/arch/riscv/lib/crt0_riscv_efi.S @@ -16,12 +16,23 @@ #define LOAD_LONG(reg, idx) ld reg, (idx*SIZE_LONG)(sp) #define PE_MACHINE IMAGE_FILE_MACHINE_RISCV64 #define PE_MAGIC IMAGE_NT_OPTIONAL_HDR64_MAGIC +#define IMG_CHARACTERISTICS \ + (IMAGE_FILE_EXECUTABLE_IMAGE | \ + IMAGE_FILE_LINE_NUMS_STRIPPED | \ + IMAGE_FILE_LOCAL_SYMS_STRIPPED | \ + IMAGE_FILE_LARGE_ADDRESS_AWARE | \ + IMAGE_FILE_DEBUG_STRIPPED) #else #define SIZE_LONG 4 #define SAVE_LONG(reg, idx) sw reg, (idx*SIZE_LONG)(sp) #define LOAD_LONG(reg, idx) lw reg, (idx*SIZE_LONG)(sp) #define PE_MACHINE IMAGE_FILE_MACHINE_RISCV32 #define PE_MAGIC IMAGE_NT_OPTIONAL_HDR32_MAGIC +#define IMG_CHARACTERISTICS \ + (IMAGE_FILE_EXECUTABLE_IMAGE | \ + IMAGE_FILE_LINE_NUMS_STRIPPED | \ + IMAGE_FILE_LOCAL_SYMS_STRIPPED | \ + IMAGE_FILE_DEBUG_STRIPPED) #endif @@ -47,11 +58,7 @@ coff_header: .long 0 /* PointerToSymbolTable */ .long 0 /* NumberOfSymbols */ .short section_table - optional_header /* SizeOfOptionalHeader */ - /* Characteristics */ - .short (IMAGE_FILE_EXECUTABLE_IMAGE | \ - IMAGE_FILE_LINE_NUMS_STRIPPED | \ - IMAGE_FILE_LOCAL_SYMS_STRIPPED | \ - IMAGE_FILE_DEBUG_STRIPPED) + .short IMG_CHARACTERISTICS /* Characteristics */ optional_header: .short PE_MAGIC /* PE32(+) format */ .byte 0x02 /* MajorLinkerVersion */ |