From c68839d4d69742ac21c430aca8a9a4de81dd6ca5 Mon Sep 17 00:00:00 2001
From: Piotr Jaroszyński
Date: Tue, 30 Mar 2010 18:18:43 +0200
Subject: [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
Signed-off-by: Joshua Oreman
Modified-by: Michael Brown
Signed-off-by: Michael Brown
---
src/Makefile.housekeeping | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'src/Makefile.housekeeping')
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
index 81396724..fbb274ff 100644
--- a/src/Makefile.housekeeping
+++ b/src/Makefile.housekeeping
@@ -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.
--
cgit v1.2.3-55-g7522