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-changelog

[Xen-changelog] [xen-unstable] [MINIOS] Clean up final link stage of the

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [MINIOS] Clean up final link stage of the build.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 15 Jan 2007 06:20:07 -0800
Delivery-date: Mon, 15 Jan 2007 06:20:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Date 1168863904 0
# Node ID fb46005e07564bd152621c2ebf2c737b4115dc83
# Parent  b2a31053955df33f8479c46d42740318c1a2316e
[MINIOS] Clean up final link stage of the build.

Allow extra application objects to be linked against a partial link of
minios with non-global names localised. For now we assume that global
names ill be assigned a xenos_ prefix in due course. We may decide to
choose a different prefix.

Those who wish to finish the link from an external Makefile can link
their own objects against mini-os.o (which must be first in link
order!) and specify the appropriate architecture linker script.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 .hgignore               |    2 +-
 extras/mini-os/Makefile |   22 +++++++++++++---------
 2 files changed, 14 insertions(+), 10 deletions(-)

diff -r b2a31053955d -r fb46005e0756 .hgignore
--- a/.hgignore Mon Jan 15 10:53:06 2007 +0000
+++ b/.hgignore Mon Jan 15 12:25:04 2007 +0000
@@ -58,7 +58,7 @@
 ^docs/xen-api/xenapi-datamodel-graph.eps$
 ^extras/mini-os/h/hypervisor-ifs$
 ^extras/mini-os/h/xen-public$
-^extras/mini-os/mini-os\..*$
+^extras/mini-os/mini-os.*$
 ^install/.*$
 ^linux-[^/]*-native/.*$
 ^linux-[^/]*-xen/.*$
diff -r b2a31053955d -r fb46005e0756 extras/mini-os/Makefile
--- a/extras/mini-os/Makefile   Mon Jan 15 10:53:06 2007 +0000
+++ b/extras/mini-os/Makefile   Mon Jan 15 12:25:04 2007 +0000
@@ -17,7 +17,13 @@ ASFLAGS = -D__ASSEMBLY__
 ASFLAGS = -D__ASSEMBLY__
 
 LDLIBS =  -L. -lminios
-LDFLAGS := -N -T minios-$(TARGET_ARCH).lds
+LDFLAGS_FINAL := -N -T minios-$(TARGET_ARCH).lds
+LDFLAGS :=
+
+# Prefix for global API names. All other symbols are localised before
+# linking with EXTRA_OBJS.
+GLOBAL_PREFIX := xenos_
+EXTRA_OBJS =
 
 # For possible special source directories.
 EXTRA_SRC =
@@ -110,18 +116,16 @@ links:    $(ARCH_LINKS)
 links: $(ARCH_LINKS)
        [ -e include/xen ] || ln -sf ../../../xen/include/public include/xen
 
-libminios.a: links $(OBJS) $(HEAD)
-       $(AR) r libminios.a $(HEAD) $(OBJS)
-
-$(TARGET): libminios.a $(HEAD)
-       $(LD) $(LDFLAGS) $(HEAD) $(LDLIBS) -o $@.elf
-       gzip -f -9 -c $@.elf >$@.gz
+$(TARGET): links $(OBJS) $(HEAD)
+       $(LD) -r $(LDFLAGS) $(HEAD) $(OBJS) -o $@.o
+       $(OBJCOPY) -w -G $(GLOBAL_PREFIX)* -G _start $@.o $@.o
+       $(LD) $(LDFLAGS) $(LDFLAGS_FINAL) $@.o $(EXTRA_OBJS) -o $@
+       gzip -f -9 -c $@ >$@.gz
 
 .PHONY: clean
 clean:
        find . -type f -name '*.o' | xargs rm -f
-       rm -f *.o *~ core $(TARGET).elf $(TARGET).raw $(TARGET) $(TARGET).gz
-       rm -f libminios.a
+       rm -f *.o *~ core $(TARGET) $(TARGET).gz
        find . -type l | xargs rm -f
        rm -f tags TAGS
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [MINIOS] Clean up final link stage of the build., Xen patchbot-unstable <=