Sfoglia il codice sorgente

efi_loader: use freestanding library for efi apps

GCC requires that freestanding programs provide memcpy(), memmove(),
memset(), and memcmp().

Add the library functions when building a *.efi files.

The EFI selftests might use other compilation flags. So use a symbolic
link to provide lib/efi_selftest/efi_freestanding.c and compile it
separately.

Reported-by: Alexander Graf <agraf@suse.de>
Fixes: 5be444d14b38 ("efi_loader: consistent build flags for EFI applications")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Heinrich Schuchardt 5 anni fa
parent
commit
2013c6850e
2 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 1 0
      lib/efi_selftest/efi_freestanding.c
  2. 1 1
      scripts/Makefile.lib

+ 1 - 0
lib/efi_selftest/efi_freestanding.c

@@ -0,0 +1 @@
+../efi_loader/efi_freestanding.c

+ 1 - 1
scripts/Makefile.lib

@@ -389,7 +389,7 @@ $(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcoun
 	$(call cmd,force_checksrc)
 	$(call if_changed_rule,cc_o_c)
 
-$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o
+$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
 	$(call cmd,efi_ld)
 
 # ACPI