WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-devel] [PATCH] ia64: consolidate final linking step

To: <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] ia64: consolidate final linking step
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Fri, 10 Jul 2009 15:22:40 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 10 Jul 2009 07:23:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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>

--- 2009-06-10.orig/xen/arch/ia64/Makefile      2009-07-01 10:34:48.000000000 
+0200
+++ 2009-06-10/xen/arch/ia64/Makefile   2009-07-01 10:35:00.000000000 +0200
@@ -3,28 +3,25 @@ subdir-y += vmx
 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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] ia64: consolidate final linking step, Jan Beulich <=