[efi] Fix .efi and .efidrv linking

The linker chooses to look for _start first and always picks
efidrvprefix.o to satisfy it (probably because it's earlier in the
archive) which causes a multiple definition error when the linker
later has to pick efiprefix.o for other symbols.

Fix by using EFI-specific TGT_LD_FLAGS with an explicit entry point.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Piotr Jaroszyński
2010-03-30 18:18:43 +02:00
committed by Michael Brown
parent 7c6d3752c9
commit c68839d4d6
5 changed files with 10 additions and 7 deletions

View File

@@ -612,7 +612,8 @@ TGT_LD_IDS = pci_vendor_id=$(firstword $(TGT_PCI_VENDOR) 0) \
#
TGT_LD_FLAGS = $(foreach SYM,$(TGT_LD_PREFIX) $(TGT_LD_DRIVERS) obj_config,\
-u $(SYM) --defsym check_$(SYM)=$(SYM) ) \
$(patsubst %,--defsym %,$(TGT_LD_IDS))
$(patsubst %,--defsym %,$(TGT_LD_IDS)) \
$(TGT_LD_FLAGS_PRE)
# Calculate list of debugging versions of objects to be included in
# the target.