Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
[powerpc.git] / arch / arm / kernel / vmlinux.lds.S
index 80c8e4c..a8fa75e 100644 (file)
@@ -4,7 +4,6 @@
  */
 
 #include <asm-generic/vmlinux.lds.h>
-#include <linux/config.h>
 #include <asm/thread_info.h>
 #include <asm/memory.h>
        
@@ -17,15 +16,13 @@ jiffies = jiffies_64;
 jiffies = jiffies_64 + 4;
 #endif
 
+SECTIONS
+{
 #ifdef CONFIG_XIP_KERNEL
-#define TEXTADDR  XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR)
+       . = XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR);
 #else
-#define TEXTADDR  KERNEL_RAM_ADDR
+       . = PAGE_OFFSET + TEXT_OFFSET;
 #endif
-
-SECTIONS
-{
-       . = TEXTADDR;
        .init : {                       /* Init code and data           */
                _stext = .;
                        _sinittext = .;
@@ -48,13 +45,7 @@ SECTIONS
                        *(.early_param.init)
                __early_end = .;
                __initcall_start = .;
-                       *(.initcall1.init)
-                       *(.initcall2.init)
-                       *(.initcall3.init)
-                       *(.initcall4.init)
-                       *(.initcall5.init)
-                       *(.initcall6.init)
-                       *(.initcall7.init)
+                       INITCALLS
                __initcall_end = .;
                __con_initcall_start = .;
                        *(.con_initcall.init)
@@ -82,6 +73,10 @@ SECTIONS
                *(.exit.text)
                *(.exit.data)
                *(.exitcall.exit)
+#ifndef CONFIG_MMU
+               *(.fixup)
+               *(__ex_table)
+#endif
        }
 
        .text : {                       /* Real text segment            */
@@ -89,7 +84,9 @@ SECTIONS
                        *(.text)
                        SCHED_TEXT
                        LOCK_TEXT
+#ifdef CONFIG_MMU
                        *(.fixup)
+#endif
                        *(.gnu.warning)
                        *(.rodata)
                        *(.rodata.*)
@@ -104,7 +101,7 @@ SECTIONS
 
 #ifdef CONFIG_XIP_KERNEL
        __data_loc = ALIGN(4);          /* location in binary */
-       . = KERNEL_RAM_ADDR;
+       . = PAGE_OFFSET + TEXT_OFFSET;
 #else
        . = ALIGN(THREAD_SIZE);
        __data_loc = .;
@@ -144,7 +141,9 @@ SECTIONS
                 */
                . = ALIGN(32);
                __start___ex_table = .;
+#ifdef CONFIG_MMU
                *(__ex_table)
+#endif
                __stop___ex_table = .;
 
                /*
@@ -172,6 +171,10 @@ SECTIONS
        .comment 0 : { *(.comment) }
 }
 
-/* those must never be empty */
+/*
+ * These must never be empty
+ * If you have to comment these two assert statements out, your
+ * binutils is too old (for other reasons as well)
+ */
 ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support")
 ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined")