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

[XenPPC] [xenppc-unstable] [ppc] stop invoking the linker directly



# HG changeset patch
# User jimix@xxxxxxxxxxxxxxxxxxx
# Node ID 116d512c236bff864e14704fbc00ae22abb3fb69
# Parent  d3e181fa238b93c616bd010edd45f707c359cf99
[ppc] stop invoking the linker directly
---
 xen/arch/ppc/Makefile |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff -r d3e181fa238b -r 116d512c236b xen/arch/ppc/Makefile
--- a/xen/arch/ppc/Makefile     Fri Jun 02 12:54:22 2006 -0500
+++ b/xen/arch/ppc/Makefile     Mon Jun 05 14:53:19 2006 -0400
@@ -44,10 +44,17 @@ obj-y += firmware_image.o
 
 CFLAGS += -Wundef -Wpointer-arith
 CFLAGS += -Wmissing-prototypes -Wmissing-declarations -Wpacked
-CFALGS += -Wredundant-decls
+CFLAGS += -Wredundant-decls
+
+#
+# The following flags are fed to gcc in order to link several
+# objects into a single ELF segment and to not link in any additional
+# objects that gcc would normally like to
+#
+OMAGIC = -N -nodefaultlibs -nostartfiles
 
 firmware: of_handler/built_in.o $(TARGET_SUBARCH)/memcpy.o of-devtree.o
-       $(LD) $(LDFLAGS) -e __ofh_start -N -Ttext=0x0 $^ -o $@
+       $(CC) $(CFLAGS) $(OMAGIC) -e __ofh_start -Wl,-Ttext,0x0 $^ -o $@
 
 firmware_image: firmware
        $(CROSS_COMPILE)objcopy --output-target=binary $< $@
@@ -72,7 +79,7 @@ start.o: boot/start.S
        $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@
 
 $(TARGET)-syms: start.o $(ALL_OBJS) xen.lds
-       $(LD) $(LDFLAGS) -N -Ttext 0x2000100 -T xen.lds start.o $(ALL_OBJS) -o 
$@
+       $(CC) $(CFLAGS) $(OMAGIC) -Wl,-Ttext,0x2000100,-T,xen.lds start.o 
$(ALL_OBJS) -o $@
 
 $(TARGET).bin: $(TARGET)-syms
        $(CROSS_COMPILE)objcopy --output-target=binary $< $@

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


 


Rackspace

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