lkml.org 
[lkml]   [2009]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 08/11] x86: use new macros for .data.init_task.
Date
.data.init_task should not need a separate output section; this change
moves it into the .data section. This has the consequence of moving
the init_task data inside _edata, which I think should be OK.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Ingo Molnar <mingo@redhat.com>
---
arch/x86/kernel/init_task.c | 3 +--
arch/x86/kernel/vmlinux.lds.S | 13 ++++---------
2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/arch/x86/kernel/init_task.c b/arch/x86/kernel/init_task.c
index df3bf26..e0383af 100644
--- a/arch/x86/kernel/init_task.c
+++ b/arch/x86/kernel/init_task.c
@@ -21,8 +21,7 @@ struct mm_struct init_mm = INIT_MM(init_mm);
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
+union thread_union init_thread_union __init_task_data =
{ INIT_THREAD_INFO(init_task) };

/*
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index c7d54bf..6b8a633 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -102,6 +102,7 @@ SECTIONS
/* Data */
. = ALIGN(PAGE_SIZE);
.data : AT(ADDR(.data) - LOAD_OFFSET) {
+ INIT_TASK_DATA(THREAD_SIZE)
PAGE_ALIGNED_DATA
NOSAVE_DATA
#ifdef CONFIG_X86_32
@@ -205,15 +206,6 @@ SECTIONS

#endif /* CONFIG_X86_64 */

- /* init_task */
- . = ALIGN(THREAD_SIZE);
- .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
- *(.data.init_task)
- }
-#ifdef CONFIG_X86_64
- :data.init
-#endif
-
/*
* smp_locks might be freed after init
* start/end must be page aligned
@@ -225,6 +217,9 @@ SECTIONS
__smp_locks_end = .;
. = ALIGN(PAGE_SIZE);
}
+#ifdef CONFIG_X86_64
+ :data.init
+#endif

/* Init code and data - will be freed after init */
. = ALIGN(PAGE_SIZE);
--
1.6.2.1


\
 
 \ /
  Last update: 2009-05-01 02:15    [W:0.059 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site