Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-drm-fsl-dcu.git] / arch / sh / kernel / vmlinux.lds.S
index 95fdd9135fcfa54f2f1cb8034ace006a78009036..75de165867a0e75a83ac4220c493c5b10a530bfb 100644 (file)
@@ -2,6 +2,7 @@
  * ld script to make SuperH Linux kernel
  * Written by Niibe Yutaka
  */
+#include <asm/thread_info.h>
 #include <asm-generic/vmlinux.lds.h>
 
 #ifdef CONFIG_CPU_LITTLE_ENDIAN
@@ -13,7 +14,7 @@ OUTPUT_ARCH(sh)
 ENTRY(_start)
 SECTIONS
 {
-  . = 0x80000000 + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
+  . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
   _text = .;                   /* Text and read-only data */
   text = .;                    /* Text and read-only data */
   .empty_zero_page : {
@@ -40,17 +41,17 @@ SECTIONS
        *(.data)
 
         /* Align the initial ramdisk image (INITRD) on page boundaries. */
-        . = ALIGN(4096);
+        . = ALIGN(PAGE_SIZE);
         __rd_start = .;
         *(.initrd)
-        . = ALIGN(4096);
+        . = ALIGN(PAGE_SIZE);
         __rd_end = .;
 
        CONSTRUCTORS
        }
 
-  . = ALIGN(4096);
-  .data.page_aligned : { *(.data.idt) }
+  . = ALIGN(PAGE_SIZE);
+  .data.page_aligned : { *(.data.page_aligned) }
 
   . = ALIGN(32);
   __per_cpu_start = .;
@@ -60,12 +61,10 @@ SECTIONS
 
   _edata = .;                  /* End of data section */
 
-  . = ALIGN(8192);             /* init_task */
+  . = ALIGN(THREAD_SIZE);              /* init_task */
   .data.init_task : { *(.data.init_task) }
-  /* stack */
-  .stack : { stack = .;  _stack = .; }
 
-  . = ALIGN(4096);             /* Init code and data */
+  . = ALIGN(PAGE_SIZE);                /* Init code and data */
   __init_begin = .;
   _sinittext = .;
   .init.text : { *(.init.text) }
@@ -77,26 +76,24 @@ SECTIONS
   __setup_end = .;
   __initcall_start = .;
   .initcall.init : {
-       *(.initcall1.init) 
-       *(.initcall2.init) 
-       *(.initcall3.init) 
-       *(.initcall4.init) 
-       *(.initcall5.init) 
-       *(.initcall6.init) 
-       *(.initcall7.init)
+       INITCALLS
   }
   __initcall_end = .;
   __con_initcall_start = .;
   .con_initcall.init : { *(.con_initcall.init) }
   __con_initcall_end = .;
   SECURITY_INIT
+
+#ifdef CONFIG_BLK_DEV_INITRD
   __initramfs_start = .;
   .init.ramfs : { *(.init.ramfs) }
   __initramfs_end = .;
+#endif
+
   __machvec_start = .;
   .init.machvec : { *(.init.machvec) }
   __machvec_end = .;
-  . = ALIGN(4096);
+  . = ALIGN(PAGE_SIZE);
   __init_end = .;
 
   . = ALIGN(4);