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

[Xen-changelog] [xen-unstable] [POWERPC][XEN] Fix yaboot loading and other linker script tweaks.



# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Node ID f7096a6728e61aa56282fa259d893e17b265b7e3
# Parent  3bd514d3e0787fbd0740a0048fa1d8582821afb8
[POWERPC][XEN] Fix yaboot loading and other linker script tweaks.
yaboot refuses to load segments at file offset 0, so move the ELF headers out
of our text segment. Also hardcode the link address in the linker script, and
remove the now-inaccurate start/end comments.
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 xen/arch/powerpc/Makefile  |    2 +-
 xen/arch/powerpc/xen.lds.S |    8 ++------
 2 files changed, 3 insertions(+), 7 deletions(-)

diff -r 3bd514d3e078 -r f7096a6728e6 xen/arch/powerpc/Makefile
--- a/xen/arch/powerpc/Makefile Thu Oct 05 16:06:42 2006 -0500
+++ b/xen/arch/powerpc/Makefile Fri Oct 06 12:15:06 2006 -0500
@@ -96,7 +96,7 @@ cmdline.o: cmdline.dep
 cmdline.o: cmdline.dep
 cmdline.o: CFLAGS += -DCMDLINE="\"$(FULL_CMDLINE)\""
 
-TARGET_OPTS = $(OMAGIC) -Wl,-Ttext,0x400000,-T,xen.lds
+TARGET_OPTS = $(OMAGIC) -Wl,-T,xen.lds
 TARGET_OPTS += start.o $(ALL_OBJS)
 
 .xen-syms: start.o $(ALL_OBJS) xen.lds
diff -r 3bd514d3e078 -r f7096a6728e6 xen/arch/powerpc/xen.lds.S
--- a/xen/arch/powerpc/xen.lds.S        Thu Oct 05 16:06:42 2006 -0500
+++ b/xen/arch/powerpc/xen.lds.S        Fri Oct 06 12:15:06 2006 -0500
@@ -12,12 +12,12 @@ SEARCH_DIR("=/usr/local/lib64"); SEARCH_
    __DYNAMIC = 0;    */
 PHDRS
 {
-  text PT_LOAD FILEHDR PHDRS;
+  text PT_LOAD;
 }   
 SECTIONS
 {
+  . = 0x00400000;
   /* Read-only sections, merged into text segment: */
-  PROVIDE (__executable_start = 0x10000000); . = 0x10000000 + SIZEOF_HEADERS;
   .interp         : { *(.interp) } :text
   .hash           : { *(.hash) }
   .dynsym         : { *(.dynsym) }
@@ -111,8 +111,6 @@ SECTIONS
     SORT(CONSTRUCTORS)
   }
 
-  /* Xen addition */
-
   . = ALIGN(32);
   __setup_start = .;
   .setup.init : { *(.setup.init) }
@@ -130,8 +128,6 @@ SECTIONS
   . = __per_cpu_start + (NR_CPUS << PERCPU_SHIFT);
   . = ALIGN(STACK_SIZE);
   __per_cpu_end = .;
-
-  /* end Xen addition */
 
   .data1          : { *(.data1) }
   .tdata         : { *(.tdata .tdata.* .gnu.linkonce.td.*) }

_______________________________________________
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®.