elf2efi converts a suitable ELF executable (containing relocation information, and with appropriate virtual addresses) into an EFI executable. It is less tightly coupled with the gPXE build process and, in particular, does not require the use of a hand-crafted PE image header in efiprefix.S. elf2efi correctly handles .bss sections, which significantly reduces the size of the gPXE EFI executable.
24 lines
455 B
Makefile
24 lines
455 B
Makefile
# -*- makefile -*- : Force emacs to use Makefile mode
|
|
|
|
# EFI probably doesn't guarantee us a red zone, so let's not rely on it.
|
|
#
|
|
CFLAGS += -mno-red-zone
|
|
|
|
# The EFI linker script
|
|
#
|
|
LDSCRIPT = arch/x86/scripts/efi.lds
|
|
|
|
# Retain relocation information for elf2efi
|
|
#
|
|
LDFLAGS += -q -S
|
|
|
|
# Media types.
|
|
#
|
|
NON_AUTO_MEDIA += efi
|
|
|
|
# Rule for building EFI files
|
|
#
|
|
$(BIN)/%.efi : $(BIN)/%.efi.tmp $(ELF2EFI64)
|
|
$(QM)$(ECHO) " [FINISH] $@"
|
|
$(Q)$(ELF2EFI64) $< $@
|