debuggers.hg

changeset 19961:895695d91ec1

ia64: consolidate final linking step

This basically makes the final linking stage identical to x86's (with
the sole difference being that ia64 has the linker generate a map
file, while x86 doesn't), so would generally allow moving the final
linking rule into xen/Rules.mk.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jul 13 11:19:31 2009 +0100 (2009-07-13)
parents 00f2162a2c5c
children 7406764457a0
files xen/arch/ia64/Makefile
line diff
     1.1 --- a/xen/arch/ia64/Makefile	Mon Jul 13 11:18:57 2009 +0100
     1.2 +++ b/xen/arch/ia64/Makefile	Mon Jul 13 11:19:31 2009 +0100
     1.3 @@ -3,28 +3,25 @@ subdir-y += vmx
     1.4  subdir-y += linux
     1.5  subdir-y += linux-xen
     1.6  
     1.7 -$(TARGET)-syms: linux-xen/head.o $(ALL_OBJS) xen.lds.s
     1.8 +ALL_OBJS := linux-xen/head.o $(ALL_OBJS)
     1.9 +
    1.10 +$(TARGET)-syms: $(ALL_OBJS) xen.lds.s
    1.11  	$(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/common/symbols-dummy.o
    1.12 -	$(LD) $(LDFLAGS) -T xen.lds.s -N \
    1.13 -		-Map map.out linux-xen/head.o $(ALL_OBJS) \
    1.14 -		$(BASEDIR)/common/symbols-dummy.o -o $@
    1.15 -	$(NM) -n $@ | $(BASEDIR)/tools/symbols > $(BASEDIR)/xen-syms.S
    1.16 -	$(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/xen-syms.o
    1.17 -	$(LD) $(LDFLAGS) -T xen.lds.s -N \
    1.18 -		-Map map.out linux-xen/head.o $(ALL_OBJS) \
    1.19 -		$(BASEDIR)/xen-syms.o -o $@
    1.20 -	$(NM) -n $@ | $(BASEDIR)/tools/symbols >$(BASEDIR)/xen-syms.S
    1.21 -	$(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/xen-syms.o
    1.22 -	$(LD) $(LDFLAGS) -T xen.lds.s -N \
    1.23 -		-Map map.out linux-xen/head.o $(ALL_OBJS) \
    1.24 -		$(BASEDIR)/xen-syms.o -o $@
    1.25 -	rm -f $(BASEDIR)/xen-syms.S $(BASEDIR)/xen-syms.o
    1.26 +	$(LD) $(LDFLAGS) -T xen.lds.s -N -Map $(@D)/.$(@F).0.map $(ALL_OBJS) \
    1.27 +		$(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 
    1.28 +	$(NM) -n $(@D)/.$(@F).0 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).0.S 
    1.29 +	$(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o 
    1.30 +	$(LD) $(LDFLAGS) -T xen.lds.s -N -Map $(@D)/.$(@F).1.map $(ALL_OBJS) \
    1.31 +		$(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 
    1.32 +	$(NM) -n $(@D)/.$(@F).1 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).1.S 
    1.33 +	$(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o 
    1.34 +	$(LD) $(LDFLAGS) -T xen.lds.s -N -Map $@.map $(ALL_OBJS) \
    1.35 +		$(@D)/.$(@F).1.o -o $@
    1.36 +	rm -f $(@D)/.$(@F).[0-9]* 
    1.37  
    1.38  $(TARGET): $(TARGET)-syms
    1.39 -	$(OBJCOPY) -R .note -R .comment -S $(TARGET)-syms $@
    1.40 -	$(NM) -n $(TARGET)-syms | \
    1.41 -		grep -v '\( [aUw] \)\|\(__crc_\)\|\( \$[adt]\)' \
    1.42 -		> $(BASEDIR)/System.map
    1.43 +	$(NM) -n $< | grep -v ' [aUw] ' > $(@D)/System.map 
    1.44 +	$(OBJCOPY) -R .note -R .comment -S $< $@
    1.45  
    1.46  # Headers do not depend on auto-generated header, but object files do.
    1.47  $(ALL_OBJS): $(BASEDIR)/include/asm-ia64/asm-xsi-offsets.h