[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] ia64: consolidate final linking step



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1247480371 -3600
# Node ID 895695d91ec110469aa66322ea4633fa95a3d152
# Parent  00f2162a2c5c0dcfc20230ed84ff3bebbb71c4ec
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@xxxxxxxxxx>
---
 xen/arch/ia64/Makefile |   35 ++++++++++++++++-------------------
 1 files changed, 16 insertions(+), 19 deletions(-)

diff -r 00f2162a2c5c -r 895695d91ec1 xen/arch/ia64/Makefile
--- a/xen/arch/ia64/Makefile    Mon Jul 13 11:18:57 2009 +0100
+++ b/xen/arch/ia64/Makefile    Mon Jul 13 11:19:31 2009 +0100
@@ -3,28 +3,25 @@ subdir-y += linux
 subdir-y += linux
 subdir-y += linux-xen
 
-$(TARGET)-syms: linux-xen/head.o $(ALL_OBJS) xen.lds.s
+ALL_OBJS := linux-xen/head.o $(ALL_OBJS)
+
+$(TARGET)-syms: $(ALL_OBJS) xen.lds.s
        $(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/common/symbols-dummy.o
-       $(LD) $(LDFLAGS) -T xen.lds.s -N \
-               -Map map.out linux-xen/head.o $(ALL_OBJS) \
-               $(BASEDIR)/common/symbols-dummy.o -o $@
-       $(NM) -n $@ | $(BASEDIR)/tools/symbols > $(BASEDIR)/xen-syms.S
-       $(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/xen-syms.o
-       $(LD) $(LDFLAGS) -T xen.lds.s -N \
-               -Map map.out linux-xen/head.o $(ALL_OBJS) \
-               $(BASEDIR)/xen-syms.o -o $@
-       $(NM) -n $@ | $(BASEDIR)/tools/symbols >$(BASEDIR)/xen-syms.S
-       $(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/xen-syms.o
-       $(LD) $(LDFLAGS) -T xen.lds.s -N \
-               -Map map.out linux-xen/head.o $(ALL_OBJS) \
-               $(BASEDIR)/xen-syms.o -o $@
-       rm -f $(BASEDIR)/xen-syms.S $(BASEDIR)/xen-syms.o
+       $(LD) $(LDFLAGS) -T xen.lds.s -N -Map $(@D)/.$(@F).0.map $(ALL_OBJS) \
+               $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 
+       $(NM) -n $(@D)/.$(@F).0 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).0.S 
+       $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o 
+       $(LD) $(LDFLAGS) -T xen.lds.s -N -Map $(@D)/.$(@F).1.map $(ALL_OBJS) \
+               $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 
+       $(NM) -n $(@D)/.$(@F).1 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).1.S 
+       $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o 
+       $(LD) $(LDFLAGS) -T xen.lds.s -N -Map $@.map $(ALL_OBJS) \
+               $(@D)/.$(@F).1.o -o $@
+       rm -f $(@D)/.$(@F).[0-9]* 
 
 $(TARGET): $(TARGET)-syms
-       $(OBJCOPY) -R .note -R .comment -S $(TARGET)-syms $@
-       $(NM) -n $(TARGET)-syms | \
-               grep -v '\( [aUw] \)\|\(__crc_\)\|\( \$[adt]\)' \
-               > $(BASEDIR)/System.map
+       $(NM) -n $< | grep -v ' [aUw] ' > $(@D)/System.map 
+       $(OBJCOPY) -R .note -R .comment -S $< $@
 
 # Headers do not depend on auto-generated header, but object files do.
 $(ALL_OBJS): $(BASEDIR)/include/asm-ia64/asm-xsi-offsets.h

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.