All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/5] efi_loader: Generate Microsoft PE format complaint images
@ 2018-09-26  6:03 Bin Meng
  2018-09-26  6:03 ` [U-Boot] [PATCH 2/5] x86: efi: payload: Generate Microsoft PE format complaint image Bin Meng
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Bin Meng @ 2018-09-26  6:03 UTC (permalink / raw)
  To: u-boot

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 <xypron.glpk@gmx.de>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 scripts/Makefile.lib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index f8c3fff..91f0b20 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -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)
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-10-02 18:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26  6:03 [U-Boot] [PATCH 1/5] efi_loader: Generate Microsoft PE format complaint images Bin Meng
2018-09-26  6:03 ` [U-Boot] [PATCH 2/5] x86: efi: payload: Generate Microsoft PE format complaint image Bin Meng
2018-09-26  6:03 ` [U-Boot] [PATCH 3/5] x86: efi: app: " Bin Meng
2018-09-26  6:03 ` [U-Boot] [PATCH 4/5] arm: efi: Generate Microsoft PE format complaint images Bin Meng
2018-09-26 17:51   ` Heinrich Schuchardt
2018-10-02 14:16     ` Bin Meng
2018-10-02 18:13       ` Heinrich Schuchardt
2018-09-26  6:03 ` [U-Boot] [PATCH 5/5] riscv: " Bin Meng
2018-09-26 17:49   ` Heinrich Schuchardt
2018-09-26 18:40 ` [U-Boot] [PATCH 1/5] efi_loader: " Heinrich Schuchardt
2018-10-02 14:31   ` Bin Meng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.