[PATCH 08/11] x86: use new macros for .data.init_task.

From: Tim Abbott
Date: Thu Apr 30 2009 - 20:12:15 EST


.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@xxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/