Skip to content

Commit

Permalink
sparc: use .data.init_task section for init_thread_union
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sam Ravnborg authored and David S. Miller committed Dec 27, 2008
1 parent 92d9091 commit b74e34d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 1 addition & 2 deletions arch/sparc/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) };
9 changes: 9 additions & 0 deletions arch/sparc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b74e34d

Please sign in to comment.