Index: arch/ppc/Makefile.inc
===================================================================
--- arch/ppc/Makefile.inc	(revision efa9b73911d63d18968d4c5215c7b8adedbe4a4a)
+++ arch/ppc/Makefile.inc	(revision c723d7a12657efec9a5af90ad5d4643ed83972b1)
@@ -16,5 +16,5 @@
 
 arch_sources= \
-	arch/powerpc.c \
+	arch/ppc.c \
 	arch/fpu_context.c \
 	arch/dummy.s \
Index: arch/ppc/_link.ld
===================================================================
--- arch/ppc/_link.ld	(revision efa9b73911d63d18968d4c5215c7b8adedbe4a4a)
+++ arch/ppc/_link.ld	(revision c723d7a12657efec9a5af90ad5d4643ed83972b1)
@@ -1,11 +1,12 @@
 /*
- *  PowerPC linker script
- *  
+ *  PPC linker script
+ *
+ *  It is ELF format, but its only section looks like this:
  *  kernel text
  *  kernel data
- *  
+ *
  */
 
-OUTPUT_FORMAT(binary)
+OUTPUT_FORMAT(elf32-powerpc)
 ENTRY(kernel_image_start)
 
@@ -15,4 +16,8 @@
 		*(K_TEXT_START)
 		*(.text);
+		ktext_end = .;
+		
+		kdata_start = .;
+		*(K_DATA_START)
 		*(.rodata);
 		*(.rodata.*);
@@ -22,24 +27,10 @@
 		*(.bss);		/* uninitialized static variables */	
 		*(COMMON); 		/* global variables */
-		ktext_end = .;
-
-		kdata_start = .;
 		kdata_end = .;
-	} = 0x00000000
-
-	. = ABSOLUTE(hardcoded_ktext_size);
-	.patch_1 : {
-        	LONG(ktext_end - ktext_start);
 	}
-
-	. = ABSOLUTE(hardcoded_kdata_size);
-	.patch_2 : {
-        	LONG(kdata_end - kdata_start);
-	}
-
-	. = ABSOLUTE(hardcoded_load_address);
-	.patch_3 : {
-		LONG(0x80000000);
-	}
+	
+	_hardcoded_ktext_size = ktext_end - ktext_start;
+	_hardcoded_kdata_size = kdata_end - kdata_start;
+	_hardcoded_load_address = 0x80000000;
 
 }
Index: arch/ppc/boot/boot.s
===================================================================
--- arch/ppc/boot/boot.s	(revision efa9b73911d63d18968d4c5215c7b8adedbe4a4a)
+++ arch/ppc/boot/boot.s	(revision c723d7a12657efec9a5af90ad5d4643ed83972b1)
@@ -31,6 +31,3 @@
 .global start
 start:
-	bl real_start
-
-real_start:
-	
+		
Index: arch/ppc/src/mm/page.c
===================================================================
--- arch/ppc/src/mm/page.c	(revision efa9b73911d63d18968d4c5215c7b8adedbe4a4a)
+++ arch/ppc/src/mm/page.c	(revision c723d7a12657efec9a5af90ad5d4643ed83972b1)
@@ -33,6 +33,4 @@
 #include <mm/page.h>
 
-pte_t *PTL0 = NULL;
-
 void page_arch_init(void)
 {
Index: ch/ppc/src/powerpc.c
===================================================================
--- arch/ppc/src/powerpc.c	(revision efa9b73911d63d18968d4c5215c7b8adedbe4a4a)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
- * Copyright (C) 2001-2004 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
Index: arch/ppc/src/ppc.c
===================================================================
--- arch/ppc/src/ppc.c	(revision c723d7a12657efec9a5af90ad5d4643ed83972b1)
+++ arch/ppc/src/ppc.c	(revision c723d7a12657efec9a5af90ad5d4643ed83972b1)
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2001-2004 Jakub Jermar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
Index: arch/ppc/src/start.S
===================================================================
--- arch/ppc/src/start.S	(revision efa9b73911d63d18968d4c5215c7b8adedbe4a4a)
+++ arch/ppc/src/start.S	(revision c723d7a12657efec9a5af90ad5d4643ed83972b1)
@@ -32,2 +32,3 @@
 
 kernel_image_start:
+	b main_bsp
