efi_loader: Generate Microsoft PE format compliant images
Subsystems (5)
PATCH v2 1/6 efi_loader: Generate Microsoft PE format compliant images
Per Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently U-Boot is generating *.efi images (eg: helloworld.efi) in which these two members are not zero.
This updates the build rules to tell linker to remove the symbol table completely so that we can generate compliant *.efi images.
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
---
Changes in v2: None
scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Makefile.lib +1 -1
@@ -381,7 +381,7 @@ $(obj)/%.efi: $(obj)/%_efi.so quiet_cmd_efi_ld = LD $@ cmd_efi_ld = $(LD) -nostdlib -znocombreloc -T $(EFI_LDS_PATH) -shared \ - -Bsymbolic $^ -o $@ + -Bsymbolic -s $^ -o $@ EFI_LDS_PATH = $(srctree)/arch/$(ARCH)/lib/$(EFI_LDS)
Signature · 1 line
2.7.4
PATCH v2 2/6 x86: efi: payload: Generate Microsoft PE format compliant image
Per Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently U-Boot is generating u-boot-payload.efi image in which these two members are not zero.
This updates the build rules to tell linker to remove the symbol table completely so that we can generate compliant *.efi images.
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
---
Changes in v2: None
arch/x86/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/config.mk +1 -1
@@ -33,7 +33,7 @@ PLATFORM_LDFLAGS += -m $(if $(IS_32BIT),elf_i386,elf_x86_64) # This is used in the top-level Makefile which does not include # PLATFORM_LDFLAGS -LDFLAGS_EFI_PAYLOAD := -Bsymbolic -Bsymbolic-functions -shared --no-undefined +LDFLAGS_EFI_PAYLOAD := -Bsymbolic -Bsymbolic-functions -shared --no-undefined -s OBJCOPYFLAGS_EFI := -j .text -j .sdata -j .data -j .dynamic -j .dynsym \ -j .rel -j .rela -j .reloc
Signature · 1 line
2.7.4
PATCH v2 2/6 x86: efi: payload: Generate Microsoft PE format compliant image
Quoted 5 lines · Bin Meng
Per Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently U-Boot is generating u-boot-payload.efi image in which these two members are not zero.
Quoted 7 lines
This updates the build rules to tell linker to remove the symbol table completely so that we can generate compliant *.efi images.
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
Reported-by Heinrich Schuchardt <[email protected]>Signed-off-by Bin Meng <[email protected]>
Alexander Graf
AppliedPATCH v2 2/6 x86: efi: payload: Generate Microsoft PE format compliant image
In reply to Bin MengQuoted 5 lines
Per Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently U-Boot is generating u-boot-payload.efi image in which these two members are not zero.
Quoted 8 lines
This updates the build rules to tell linker to remove the symbol table completely so that we can generate compliant *.efi images.
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
Reported-by Heinrich Schuchardt <[email protected]>Signed-off-by Bin Meng <[email protected]>Reviewed-by Heinrich Schuchardt <[email protected]>
Thanks, applied to efi-next
Alex
PATCH v2 3/6 x86: efi: app: Generate Microsoft PE format compliant image
In reply to Bin MengPer Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently U-Boot is generating u-boot-app.efi in which these two members are not zero.
This updates the build rules to tell linker to remove the symbol table completely so that we can generate compliant *.efi images.
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
---
Changes in v2: None
arch/x86/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/config.mk +1 -1
@@ -64,7 +64,7 @@ CPPFLAGS_crt0-efi-$(EFIARCH).o += $(CFLAGS_EFI) ifeq ($(CONFIG_EFI_APP),y) PLATFORM_CPPFLAGS += $(CFLAGS_EFI) -LDFLAGS_FINAL += -znocombreloc -shared +LDFLAGS_FINAL += -znocombreloc -shared -s LDSCRIPT := $(LDSCRIPT_EFI) else
Signature · 1 line
2.7.4
PATCH v2 3/6 x86: efi: app: Generate Microsoft PE format compliant image
Quoted 11 lines · Bin Meng
Per Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently U-Boot is generating u-boot-app.efi in which these two members are not zero.
This updates the build rules to tell linker to remove the symbol table completely so that we can generate compliant *.efi images.
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
Signed-off-by Bin Meng <[email protected]>
Alexander Graf
AppliedPATCH v2 3/6 x86: efi: app: Generate Microsoft PE format compliant image
In reply to Bin MengQuoted 5 lines
Per Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently U-Boot is generating u-boot-app.efi in which these two members are not zero.
Quoted 7 lines
This updates the build rules to tell linker to remove the symbol table completely so that we can generate compliant *.efi images.
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
Signed-off-by Bin Meng <[email protected]>Reviewed-by Heinrich Schuchardt <[email protected]>
Thanks, applied to efi-next
Alex
PATCH v2 4/6 pe.h: Add characteristics defines
In reply to Bin MengThis adds characteristics macros as defined by the Microsoft PE Format documentation [1].
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
---
Changes in v2:
- new patch to add characteristics defines in pe.h
include/asm-generic/pe.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
include/asm-generic/pe.h +18 -0
@@ -11,6 +11,24 @@#ifndef _ASM_PE_H#define _ASM_PE_H +/* Characteristics */ +#define IMAGE_FILE_RELOCS_STRIPPED 0x0001 +#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 +#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 +#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 +#define IMAGE_FILE_AGGRESSIVE_WS_TRIM 0x0010 +#define IMAGE_FILE_LARGE_ADDRESS_AWARE 0x0020 +/* Reserved 0x0040 */ +#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080 +#define IMAGE_FILE_32BIT_MACHINE 0x0100 +#define IMAGE_FILE_DEBUG_STRIPPED 0x0200 +#define IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP 0x0400 +#define IMAGE_FILE_NET_RUN_FROM_SWAP 0x0800 +#define IMAGE_FILE_SYSTEM 0x1000 +#define IMAGE_FILE_DLL 0x2000 +#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000 +#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000 +/* Subsystem type */ #define IMAGE_SUBSYSTEM_EFI_APPLICATION 10#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
Signature · 1 line
2.7.4
PATCH v2 4/6 pe.h: Add characteristics defines
Quoted 6 lines · Bin Meng
This adds characteristics macros as defined by the Microsoft PE Format documentation [1].
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
Signed-off-by Bin Meng <[email protected]>
Quoted 5 lines
---
Changes in v2:
- new patch to add characteristics defines inpe.h
Alexander Graf
AppliedPATCH v2 4/6 pe.h: Add characteristics defines
In reply to Bin MengQuoted 7 lines
This adds characteristics macros as defined by the Microsoft PE Format documentation [1].
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
Signed-off-by Bin Meng <[email protected]>Reviewed-by Heinrich Schuchardt <[email protected]>
Thanks, applied to efi-next
Alex
PATCH v2 5/6 arm: efi: Generate Microsoft PE format compliant images
In reply to Bin MengPer Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently the COFF file header is hardcoded on ARM and these two members are not zero.
This updates the hardcoded structure to clear these two members, as well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we can generate compliant *.efi images.
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
---
Changes in v2:
- use macros in pe.h for the characteristics field
arch/arm/lib/crt0_aarch64_efi.S | 12 ++++++------ arch/arm/lib/crt0_arm_efi.S | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-)
arch/arm/lib/crt0_aarch64_efi.S +6 -6
@@ -28,13 +28,13 @@ coff_header: .short 2 /* nr_sections */ .long 0 /* TimeDateStamp */ .long 0 /* PointerToSymbolTable */ - .long 1 /* NumberOfSymbols */ + .long 0 /* NumberOfSymbols */ .short section_table - optional_header /* SizeOfOptionalHeader */ - /* - * Characteristics: IMAGE_FILE_DEBUG_STRIPPED | - * IMAGE_FILE_EXECUTABLE_IMAGE | IMAGE_FILE_LINE_NUMS_STRIPPED - */ - .short 0x206 + /* Characteristics */ + .short (IMAGE_FILE_EXECUTABLE_IMAGE | \ + IMAGE_FILE_LINE_NUMS_STRIPPED | \ + IMAGE_FILE_LOCAL_SYMS_STRIPPED | \ + IMAGE_FILE_DEBUG_STRIPPED) optional_header: .short 0x20b /* PE32+ format */ .byte 0x02 /* MajorLinkerVersion */
arch/arm/lib/crt0_arm_efi.S +8 -8
@@ -27,16 +27,16 @@ coff_header: .short 2 /* nr_sections */ .long 0 /* TimeDateStamp */ .long 0 /* PointerToSymbolTable */ - .long 1 /* NumberOfSymbols */ + .long 0 /* NumberOfSymbols */ .short section_table - optional_header /* SizeOfOptionalHeader */ - /* - * Characteristics: IMAGE_FILE_32BIT_MACHINE | - * IMAGE_FILE_DEBUG_STRIPPED | IMAGE_FILE_EXECUTABLE_IMAGE | - * IMAGE_FILE_LINE_NUMS_STRIPPED - */ - .short 0x306 + /* Characteristics */ + .short (IMAGE_FILE_EXECUTABLE_IMAGE | \ + IMAGE_FILE_LINE_NUMS_STRIPPED | \ + IMAGE_FILE_LOCAL_SYMS_STRIPPED | \ + IMAGE_FILE_32BIT_MACHINE | \ + IMAGE_FILE_DEBUG_STRIPPED) optional_header: - .short 0x10b /* PE32+ format */ + .short 0x10b /* PE32 format */ .byte 0x02 /* MajorLinkerVersion */ .byte 0x14 /* MinorLinkerVersion */ .long _edata - _start /* SizeOfCode */
Signature · 1 line
2.7.4
PATCH v2 5/6 arm: efi: Generate Microsoft PE format compliant images
Quoted 5 lines · Bin Meng
Per Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently the COFF file header is hardcoded on ARM and these two members are not zero.
Quoted 7 lines
This updates the hardcoded structure to clear these two members, as well as setting the flag
IMAGE_FILE_LOCAL_SYMS_STRIPPEDso that we can generate compliant *.efi images.[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
Signed-off-by Bin Meng <[email protected]>
Quoted 9 lines
---
Changes in v2:
- use macros inpe.hfor the characteristics fieldarch/arm/lib/crt0_aarch64_efi.S | 12 ++++++------ arch/arm/lib/crt0_arm_efi.S | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-)
Alexander Graf
AppliedPATCH v2 5/6 arm: efi: Generate Microsoft PE format compliant images
In reply to Bin MengQuoted 5 lines
Per Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently the COFF file header is hardcoded on ARM and these two members are not zero.
Quoted 8 lines
This updates the hardcoded structure to clear these two members, as well as setting the flag
IMAGE_FILE_LOCAL_SYMS_STRIPPEDso that we can generate compliant *.efi images.[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
Signed-off-by Bin Meng <[email protected]>Reviewed-by Heinrich Schuchardt <[email protected]>
Thanks, applied to efi-next
Alex
PATCH v2 6/6 riscv: efi: Generate Microsoft PE format compliant images
In reply to Bin MengPer Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently the COFF file header is hardcoded on RISC-V and these two members are not zero.
This updates the hardcoded structure to clear these two members, as well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we can generate compliant *.efi images.
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
---
Changes in v2:
- use macros in pe.h for the characteristics field
arch/riscv/lib/crt0_riscv_efi.S | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/riscv/lib/crt0_riscv_efi.S +6 -6
@@ -41,13 +41,13 @@ coff_header: .short 2 /* nr_sections */ .long 0 /* TimeDateStamp */ .long 0 /* PointerToSymbolTable */ - .long 1 /* NumberOfSymbols */ + .long 0 /* NumberOfSymbols */ .short section_table - optional_header /* SizeOfOptionalHeader */ - /* - * Characteristics: IMAGE_FILE_DEBUG_STRIPPED | - * IMAGE_FILE_EXECUTABLE_IMAGE | IMAGE_FILE_LINE_NUMS_STRIPPED - */ - .short 0x206 + /* Characteristics */ + .short (IMAGE_FILE_EXECUTABLE_IMAGE | \ + IMAGE_FILE_LINE_NUMS_STRIPPED | \ + IMAGE_FILE_LOCAL_SYMS_STRIPPED | \ + IMAGE_FILE_DEBUG_STRIPPED) optional_header: .short 0x20b /* PE32+ format */ .byte 0x02 /* MajorLinkerVersion */
Signature · 1 line
2.7.4
PATCH v2 6/6 riscv: efi: Generate Microsoft PE format compliant images
Quoted 26 lines · Bin Meng
Per Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently the COFF file header is hardcoded on RISC-V and these two members are not zero.
This updates the hardcoded structure to clear these two members, as well as setting the flag
IMAGE_FILE_LOCAL_SYMS_STRIPPEDso that we can generate compliant *.efi images.[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
Signed-off-by Bin Meng <[email protected]>---
Changes in v2:
- use macros inpe.hfor the characteristics fieldarch/riscv/lib/crt0_riscv_efi.S | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)arch/riscv/lib/crt0_riscv_efi.S +0
-0
arch/riscv/lib/crt0_riscv_efi.S coff_header: · line 44
Quoted 5 lines
arch/riscv/lib/crt0_riscv_efi.S +1
-1@@ -41,13 +41,13 @@ coff_header: .short 2 /* nr_sections */ .long 0 /* TimeDateStamp */ .long 0 /* PointerToSymbolTable */ - .long 1 /* NumberOfSymbols */ + .long 0 /* NumberOfSymbols */
Looking at the top of the file it is meant both for 32bit and for 64bit systems:
#if __riscv_xlen == 64
#define SIZE_LONG 8
#define SAVE_LONG(reg, idx) sd reg, (idx*SIZE_LONG)(sp) #define LOAD_LONG(reg, idx) ld reg, (idx*SIZE_LONG)(sp) #define PE_MACHINE 0x5064 #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 0x5032
#endif
But for 32bit and 64bit we cannot use the same values of characteristics and we need different optional header formats.
For the ARM and the x86 architecture this has resulted in separate files crt0*.S - one for 32bit, the other for 64bit.
Shouldn't we go the same way for RISC-V?
arch/riscv/lib/crt0_riscv_efi.S coff_header: · line 50
Quoted 11 lines
arch/riscv/lib/crt0_riscv_efi.S +5
-5.short section_table - optional_header /* SizeOfOptionalHeader */ - /* - * Characteristics: IMAGE_FILE_DEBUG_STRIPPED | - * IMAGE_FILE_EXECUTABLE_IMAGE | IMAGE_FILE_LINE_NUMS_STRIPPED - */ - .short 0x206 + /* Characteristics */ + .short (IMAGE_FILE_EXECUTABLE_IMAGE | \ + IMAGE_FILE_LINE_NUMS_STRIPPED | \ + IMAGE_FILE_LOCAL_SYMS_STRIPPED | \ + IMAGE_FILE_DEBUG_STRIPPED)
These values suit 64bit only.
As currently we only have a defconfig for a 64bit system - ax25-ae350_defconfig - let's merge this patch.
@Bin:
Your "riscv: Add QEMU virt board support" patch series adds a 32bit board. Please, consider adding a separate 32bit crt0*.S there.
Quoted 4 lines
arch/riscv/lib/crt0_riscv_efi.S +0
-0optional_header: .short 0x20b /* PE32+ format */ .byte 0x02 /* MajorLinkerVersion */
PATCH v2 6/6 riscv: efi: Generate Microsoft PE format compliant images
Hi Heinrich,
Quoted 49 lines · Heinrich Schuchardt
Quoted 26 lines · Bin Meng
Per Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently the COFF file header is hardcoded on RISC-V and these two members are not zero.
This updates the hardcoded structure to clear these two members, as well as setting the flag
IMAGE_FILE_LOCAL_SYMS_STRIPPEDso that we can generate compliant *.efi images.[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
Signed-off-by Bin Meng <[email protected]>---
Changes in v2:
- use macros inpe.hfor the characteristics fieldarch/riscv/lib/crt0_riscv_efi.S | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)arch/riscv/lib/crt0_riscv_efi.S +0
-0arch/riscv/lib/crt0_riscv_efi.S coff_header: · line 44
Quoted 5 lines
arch/riscv/lib/crt0_riscv_efi.S +1
-1@@ -41,13 +41,13 @@ coff_header: .short 2 /* nr_sections */ .long 0 /* TimeDateStamp */ .long 0 /* PointerToSymbolTable */ - .long 1 /* NumberOfSymbols */ + .long 0 /* NumberOfSymbols */Looking at the top of the file it is meant both for 32bit and for 64bit systems:
#if
__riscv_xlen== 64
#defineSIZE_LONG8#define SAVE_LONG(reg, idx) sd reg, (idx*SIZE_LONG)(sp) #define LOAD_LONG(reg, idx) ld reg, (idx*SIZE_LONG)(sp) #define PE_MACHINE 0x5064 #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_MACHINE0x5032
#endif
Quoted 8 lines
But for 32bit and 64bit we cannot use the same values of characteristics and we need different optional header formats.
For the ARM and the x86 architecture this has resulted in separate files crt0*.S - one for 32bit, the other for 64bit.
Shouldn't we go the same way for RISC-V?
You observation is correct. We should use separate files to support 32-bit and 64-bit.
Quoted 12 lines
arch/riscv/lib/crt0_riscv_efi.S coff_header: · line 50
Quoted 11 lines
arch/riscv/lib/crt0_riscv_efi.S +5
-5.short section_table - optional_header /* SizeOfOptionalHeader */ - /* - * Characteristics: IMAGE_FILE_DEBUG_STRIPPED | - * IMAGE_FILE_EXECUTABLE_IMAGE | IMAGE_FILE_LINE_NUMS_STRIPPED - */ - .short 0x206 + /* Characteristics */ + .short (IMAGE_FILE_EXECUTABLE_IMAGE | \ + IMAGE_FILE_LINE_NUMS_STRIPPED | \ + IMAGE_FILE_LOCAL_SYMS_STRIPPED | \ + IMAGE_FILE_DEBUG_STRIPPED)
Quoted 9 lines
These values suit 64bit only.
As currently we only have a defconfig for a 64bit system - ax25-ae350_defconfig - let's merge this patch.
@Bin:
Your "riscv: Add QEMU virt board support" patch series adds a 32bit board. Please, consider adding a separate 32bit crt0*.S there.
Sure, will do it in coming patches.
Quoted 6 lines
Reviewed-by Heinrich Schuchardt <[email protected]>Quoted 4 lines
arch/riscv/lib/crt0_riscv_efi.S +0
-0optional_header: .short 0x20b /* PE32+ format */ .byte 0x02 /* MajorLinkerVersion */
Regards,
Bin
Alexander Graf
AppliedPATCH v2 6/6 riscv: efi: Generate Microsoft PE format compliant images
In reply to Bin MengQuoted 5 lines
Per Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently the COFF file header is hardcoded on RISC-V and these two members are not zero.
Quoted 8 lines
This updates the hardcoded structure to clear these two members, as well as setting the flag
IMAGE_FILE_LOCAL_SYMS_STRIPPEDso that we can generate compliant *.efi images.[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
Signed-off-by Bin Meng <[email protected]>Reviewed-by Heinrich Schuchardt <[email protected]>
Thanks, applied to efi-next
Alex
PATCH v2 1/6 efi_loader: Generate Microsoft PE format compliant images
In reply to Bin MengQuoted 5 lines · Bin Meng
Per Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently U-Boot is generating *.efi images (eg: helloworld.efi) in which these two members are not zero.
Quoted 8 lines
This updates the build rules to tell linker to remove the symbol table completely so that we can generate compliant *.efi images.
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
Reported-by Heinrich Schuchardt <[email protected]>Signed-off-by Bin Meng <[email protected]>Reviewed-by Heinrich Schuchardt <[email protected]>
I couldn't find a cover letter for this series, so I'll just reply here for the whole set:
Which tree do you want to have this applied through?
Alex
PATCH v2 1/6 efi_loader: Generate Microsoft PE format compliant images
Hi Alex,
Quoted 14 lines · Alexander Graf
Quoted 10 lines · Bin Meng
Per Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently U-Boot is generating *.efi images (eg: helloworld.efi) in which these two members are not zero.
This updates the build rules to tell linker to remove the symbol table completely so that we can generate compliant *.efi images.
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
Quoted 9 lines
Quoted 3 lines
Reported-by Heinrich Schuchardt <[email protected]>Signed-off-by Bin Meng <[email protected]>Reviewed-by Heinrich Schuchardt <[email protected]>I couldn't find a cover letter for this series, so I'll just reply here for the whole set:
Which tree do you want to have this applied through?
There is no cover letter for this series. In patchwork, this series is assigned to you so I assume this should go through the efi tree.
Regards,
Bin
PATCH v2 1/6 efi_loader: Generate Microsoft PE format compliant images
Quoted 21 lines · Bin Meng
Hi Alex,
Quoted 18 lines · Alexander Graf
Quoted 13 lines · Bin Meng
Per Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently U-Boot is generating *.efi images (eg: helloworld.efi) in which these two members are not zero.
This updates the build rules to tell linker to remove the symbol table completely so that we can generate compliant *.efi images.
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
Reported-by Heinrich Schuchardt <[email protected]>Signed-off-by Bin Meng <[email protected]>Reviewed-by Heinrich Schuchardt <[email protected]>
Quoted 8 lines
Quoted 5 lines
I couldn't find a cover letter for this series, so I'll just reply here for the whole set:
Which tree do you want to have this applied through?
There is no cover letter for this series. In patchwork, this series is assigned to you so I assume this should go through the efi tree.
Ok, in that case, are you intending to send a follow-up patch for riscv32 or do you want to do a v3?
Alex
PATCH v2 1/6 efi_loader: Generate Microsoft PE format compliant images
Hi Alex,
Quoted 28 lines · Alexander Graf
Quoted 24 lines · Bin Meng
Hi Alex,
Quoted 21 lines · Alexander Graf
Quoted 5 lines · Bin Meng
Per Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently U-Boot is generating *.efi images (eg: helloworld.efi) in which these two members are not zero.
Quoted 8 lines
This updates the build rules to tell linker to remove the symbol table completely so that we can generate compliant *.efi images.
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
Reported-by Heinrich Schuchardt <[email protected]>Signed-off-by Bin Meng <[email protected]>Reviewed-by Heinrich Schuchardt <[email protected]>I couldn't find a cover letter for this series, so I'll just reply here for the whole set:
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
Which tree do you want to have this applied through?
There is no cover letter for this series. In patchwork, this series is assigned to you so I assume this should go through the efi tree.
Ok, in that case, are you intending to send a follow-up patch for riscv32 or do you want to do a v3?
No, the riscv32 is totally unrelated. It can be a separate patch (series).
Regards,
Bin
Alexander Graf
AppliedPATCH v2 1/6 efi_loader: Generate Microsoft PE format compliant images
In reply to Bin MengQuoted 5 lines
Per Microsoft PE Format documentation [1], PointerToSymbolTable and NumberOfSymbols should be zero for an image in the COFF file header. Currently U-Boot is generating *.efi images (eg: helloworld.efi) in which these two members are not zero.
Quoted 8 lines
This updates the build rules to tell linker to remove the symbol table completely so that we can generate compliant *.efi images.
[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format
Reported-by Heinrich Schuchardt <[email protected]>Signed-off-by Bin Meng <[email protected]>Reviewed-by Heinrich Schuchardt <[email protected]>
Thanks, applied to efi-next
Alex