summaryrefslogtreecommitdiff
path: root/scripts/Makefile.lib
diff options
context:
space:
mode:
authorAlistair Delva <adelva@google.com>2021-10-21 00:31:31 +0300
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-10-21 04:46:04 +0300
commitaf484011f12e2aa37bcf4f9cbb4258dea4ef14ac (patch)
tree180ad2712e08f15b4fbe9cf4bb4f5b71f1d1f9a2 /scripts/Makefile.lib
parentdb61e70e0d2ab94f572a5ec0900c7c51fb686177 (diff)
downloadu-boot-af484011f12e2aa37bcf4f9cbb4258dea4ef14ac.tar.xz
efi_loader: Fix link of EFI apps with ld.lld
When compiling U-Boot with ld.lld as the linker, the helloworld EFI app example fails to link: LD lib/efi_loader/helloworld_efi.so ld.lld: error: section: .dynamic is not contiguous with other relro sections LLD will always create RELRO program header regardless of target emulation, whereas BFD may automatically disable it for unsupported targets. Add -znorelro to disable it explicitly in all cases. Signed-off-by: Alistair Delva <adelva@google.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r--scripts/Makefile.lib2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 07696e86bb..39f03398ed 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -403,7 +403,7 @@ $(obj)/%.efi: $(obj)/%_efi.so
quiet_cmd_efi_ld = LD $@
cmd_efi_ld = $(LD) -nostdlib -znocombreloc -T $(EFI_LDS_PATH) -shared \
- -Bsymbolic -s $^ -o $@
+ -Bsymbolic -znorelro -s $^ -o $@
EFI_LDS_PATH = $(srctree)/arch/$(ARCH)/lib/$(EFI_LDS)