summaryrefslogtreecommitdiffstats
path: root/src/Makefile.housekeeping
diff options
context:
space:
mode:
authorMichael Brown2011-02-23 22:12:56 +0100
committerMichael Brown2011-02-23 22:12:56 +0100
commit030e5a064e5f7252b3b77a27c78169f4a5c974c5 (patch)
treed6d310ab791f714a0d2da64543deb3cb6f261b4a /src/Makefile.housekeeping
parent[build] Ensure an entry point symbol exists in all builds (diff)
downloadipxe-030e5a064e5f7252b3b77a27c78169f4a5c974c5.tar.gz
ipxe-030e5a064e5f7252b3b77a27c78169f4a5c974c5.tar.xz
ipxe-030e5a064e5f7252b3b77a27c78169f4a5c974c5.zip
[build] Use unique entry symbols for each prefix
Some binutils versions will drag in an object to satisfy the entry symbol; some won't. Try to cope with this exciting variety of behaviour by ensuring that all entry symbols are unique. Remove the explicit inclusion of the prefix object on the linker command line, since the entry symbol now provides all the information needed to identify the prefix. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/Makefile.housekeeping')
-rw-r--r--src/Makefile.housekeeping8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
index c4350671..0570f018 100644
--- a/src/Makefile.housekeeping
+++ b/src/Makefile.housekeeping
@@ -656,9 +656,9 @@ TGT_PCI_DEVICE = $(PCI_DEVICE_$(TGT_ROM_NAME))
# ROM header (e.g."pci_vendor_id=0x1186 pci_device_id=0x1300")
#
TGT_LD_DRIVERS = $(subst -,_,$(patsubst %,obj_%,$(TGT_DRIVERS)))
-TGT_LD_PREFIX = obj_$(TGT_PREFIX)prefix
TGT_LD_IDS = pci_vendor_id=$(firstword $(TGT_PCI_VENDOR) 0) \
pci_device_id=$(firstword $(TGT_PCI_DEVICE) 0)
+TGT_LD_ENTRY = _$(TGT_PREFIX)_start
# Calculate linker flags based on link-time options for the current
# target type (e.g. "bin/dfe538--prism2_pci.zrom.tmp") and derive the
@@ -668,10 +668,10 @@ TGT_LD_IDS = pci_vendor_id=$(firstword $(TGT_PCI_VENDOR) 0) \
# "-u obj_zpciprefix -u obj_rtl8139 -u obj_prism2_pci
# --defsym pci_vendor=0x1186 --defsym pci_device=0x1300")
#
-TGT_LD_FLAGS = $(foreach SYM,$(TGT_LD_PREFIX) $(TGT_LD_DRIVERS) obj_config,\
+TGT_LD_FLAGS = $(foreach SYM,$(TGT_LD_ENTRY) $(TGT_LD_DRIVERS) obj_config,\
-u $(SYM) --defsym check_$(SYM)=$(SYM) ) \
$(patsubst %,--defsym %,$(TGT_LD_IDS)) \
- $(TGT_LD_FLAGS_PRE)
+ -e $(TGT_LD_ENTRY)
# Calculate list of debugging versions of objects to be included in
# the target.
@@ -698,8 +698,8 @@ $(BIN)/%.info :
@$(ECHO) 'PCI device : $(TGT_PCI_DEVICE)'
@$(ECHO)
@$(ECHO) 'LD driver symbols : $(TGT_LD_DRIVERS)'
- @$(ECHO) 'LD prefix symbols : $(TGT_LD_PREFIX)'
@$(ECHO) 'LD ID symbols : $(TGT_LD_IDS)'
+ @$(ECHO) 'LD entry point : $(TGT_LD_ENTRY)'
@$(ECHO)
@$(ECHO) 'LD target flags : $(TGT_LD_FLAGS)'
@$(ECHO)