Commit 972ffcd7b0bef07e07e02a339bc0ae95a5d9d5b8
Committed by
Alexander Graf
1 parent
f7855bb7db
Exists in
smarc_8mq_lf_v2020.04
and in
12 other branches
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 Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
arch/x86/config.mk
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 | |
35 | 35 | # This is used in the top-level Makefile which does not include |
36 | 36 | # PLATFORM_LDFLAGS |
37 | -LDFLAGS_EFI_PAYLOAD := -Bsymbolic -Bsymbolic-functions -shared --no-undefined | |
37 | +LDFLAGS_EFI_PAYLOAD := -Bsymbolic -Bsymbolic-functions -shared --no-undefined -s | |
38 | 38 | |
39 | 39 | OBJCOPYFLAGS_EFI := -j .text -j .sdata -j .data -j .dynamic -j .dynsym \ |
40 | 40 | -j .rel -j .rela -j .reloc |