]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
sparc: use .data.init_task section for init_thread_union
authorSam Ravnborg <sam@ravnborg.org>
Sat, 27 Dec 2008 08:34:41 +0000 (00:34 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 27 Dec 2008 08:34:41 +0000 (00:34 -0800)
Use a dedicated aligned section for the init_thread_union
variable and declare this section in vmlinux.lds.

This align sparc with most other architectures.  Eventually this allow
the init_task bits to be unified across all architectures.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/init_task.c
arch/sparc/kernel/vmlinux.lds.S

index 8e64ebc445ef8c158f8fd594ed424fd24efda6e6..62126e4cec54c53c2572a93d3bf4055fe22ba709 100644 (file)
@@ -23,6 +23,5 @@ EXPORT_SYMBOL(init_task);
  * in etrap.S which assumes it.
  */
 union thread_union init_thread_union
-       __attribute__((section (".text\"\n\t#")))
-       __attribute__((aligned (THREAD_SIZE)))
+       __attribute__((section (".data.init_task")))
        = { INIT_THREAD_INFO(init_task) };
index 4bfbeffb73208545989429ea020903dd918ab864..59c8d090920c8befa49339cdfcc654d561c6e564 100644 (file)
@@ -1,7 +1,9 @@
 /* ld script for sparc32/sparc64 kernel */
 
 #include <asm-generic/vmlinux.lds.h>
+
 #include <asm/page.h>
+#include <asm/thread_info.h>
 
 #ifdef CONFIG_SPARC32
 #define INITIAL_ADDRESS  0x10000 + SIZEOF_HEADERS
@@ -65,8 +67,15 @@ SECTIONS
        .data.read_mostly : {
                *(.data.read_mostly)
        }
+       /* End of data section */
        _edata = .;
        PROVIDE (edata = .);
+
+       /* init_task */
+       . = ALIGN(THREAD_SIZE);
+       .data.init_task : {
+               *(.data.init_task)
+       }
        .fixup : {
                __start___fixup = .;
                *(.fixup)