section name cleanup for m68knommu
cover section name cleanup for m68knommu
This patch series cleans up the section names on the m68knommu architecture. It requires the architecture-independent macro definitions from this patch series:
<http://www.spinics.net/lists/mips/msg33499.html>
The long-term goal here is to add support for building the kernel with -ffunction-sections -fdata-sections. This requires renaming all the magic section names in the kernel of the form .text.foo, .data.foo, .bss.foo, and .rodata.foo to not have collisions with sections generated for code like:
static int nosave = 0; /* -fdata-sections places in .data.nosave */ static void head(); /* -ffunction-sections places in .text.head */
Note that these patches have not been boot-tested (aside from testing the analogous changes on x86), since I don't have access to the appropriate hardware.
-Tim Abbott
Tim Abbott (2):
m68knommu: use new macro for .data.cacheline_aligned section.
m68knommu: use new macros for .data.init_task.
arch/m68knommu/kernel/init_task.c | 3 +-- arch/m68knommu/kernel/vmlinux.lds.S | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-)
PATCH 1/2 m68knommu: use new macro for .data.cacheline_aligned section.
--- arch/m68knommu/kernel/vmlinux.lds.S | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
arch/m68knommu/kernel/vmlinux.lds.S +1 -2
@@ -147,8 +147,7 @@ SECTIONS { . = ALIGN(4); _sdata = . ; DATA_DATA - . = ALIGN(32); - *(.data.cacheline_aligned) + CACHELINE_ALIGNED_DATA(32) . = ALIGN(8192) ; *(.data.init_task) _edata = . ;
Signature · 1 line
1.6.2.1
PATCH 2/2 m68knommu: use new macros for .data.init_task.
--- arch/m68knommu/kernel/init_task.c | 3 +-- arch/m68knommu/kernel/vmlinux.lds.S | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
arch/m68knommu/kernel/init_task.c +1 -2
@@ -35,7 +35,6 @@ EXPORT_SYMBOL(init_task);* 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) };
arch/m68knommu/kernel/vmlinux.lds.S +1 -2
@@ -146,10 +146,9 @@ SECTIONS { .data DATA_ADDR : { . = ALIGN(4); _sdata = . ; + INIT_TASK_DATA(8192) DATA_DATA CACHELINE_ALIGNED_DATA(32) - . = ALIGN(8192) ; - *(.data.init_task) _edata = . ; } > DATA
Signature · 1 line
1.6.2.1
Hi Tim,
Quoted 22 lines · Tim Abbott
This patch series cleans up the section names on the m68knommu architecture. It requires the architecture-independent macro definitions from this patch series:
<http://www.spinics.net/lists/mips/msg33499.html>
The long-term goal here is to add support for building the kernel with -ffunction-sections -fdata-sections. This requires renaming all the magic section names in the kernel of the form .text.foo, .data.foo, .bss.foo, and .rodata.foo to not have collisions with sections generated for code like:
static int nosave = 0; /* -fdata-sections places in .data.nosave */ static void
head(); /* -ffunction-sections places in .text.head */Note that these patches have not been boot-tested (aside from testing the analogous changes on x86), since I don't have access to the appropriate hardware.
-Tim Abbott
Quoted 7 lines
Tim Abbott (2):
m68knommu: use new macro for .data.cacheline_aligned section.
m68knommu: use new macros for .data.init_task.arch/m68knommu/kernel/init_task.c | 3 +-- arch/m68knommu/kernel/vmlinux.lds.S | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-)
I don't see any problems here for m68knommu.
Regards
Greg
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: [email protected] SnapGear Group, McAfee PHONE: +61 7 3435 2888 825 Stanley St, FAX: +61 7 3891 3630 Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com