section name cleanup for m68k
Subsystems (2)
cover section name cleanup for m68k
This patch series cleans up the section names on the m68k 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):
m68k: use new macro for .data.cacheline_aligned section.
m68k: use new macros for .data.init_task.
arch/m68k/kernel/process.c | 4 ++-- arch/m68k/kernel/vmlinux-std.lds | 7 ++----- arch/m68k/kernel/vmlinux-sun3.lds | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-)
PATCH 1/2 m68k: use new macro for .data.cacheline_aligned section.
.data.cacheline_aligned should not need a separate output section; this change moves it into the .data section.
--- arch/m68k/kernel/vmlinux-std.lds | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
arch/m68k/kernel/vmlinux-std.lds +1 -3
@@ -30,13 +30,11 @@ SECTIONS RODATA .data : { /* Data */ + CACHELINE_ALIGNED_DATA(16) DATA_DATA CONSTRUCTORS } - . = ALIGN(16); - .data.cacheline_aligned : { *(.data.cacheline_aligned) } - .bss : { *(.bss) } /* BSS */ _edata = .; /* End of data section */
Signature · 1 line
1.6.2.1
PATCH 2/2 m68k: use new macros for .data.init_task.
.data.init_task should not need a separate output section; this change moves it into the .data section.
I changed the aligment in both linker scripts to be THREAD_SIZE from 8192 and PAGE_SIZE, respectively. I'd like an ack from one of the m68k maintainers that this is right.
--- arch/m68k/kernel/process.c | 4 ++-- arch/m68k/kernel/vmlinux-std.lds | 3 +-- arch/m68k/kernel/vmlinux-sun3.lds | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-)
arch/m68k/kernel/process.c +2 -2
@@ -46,8 +46,8 @@ struct mm_struct init_mm = INIT_MM(init_mm);EXPORT_SYMBOL (init_mm); -union thread_union init_thread_union -__attribute__((section(".data.init_task"), aligned(THREAD_SIZE))) +union thread_union init_thread_union __init_task_data +__attribute__((aligned(THREAD_SIZE))) = {INIT_THREAD_INFO (init_task) };/* initial task structure */
arch/m68k/kernel/vmlinux-std.lds +1 -2
@@ -30,6 +30,7 @@ SECTIONS RODATA .data : { /* Data */ + INIT_TASK_DATA(THREAD_SIZE) CACHELINE_ALIGNED_DATA(16) DATA_DATA CONSTRUCTORS
@@ -76,8 +77,6 @@ SECTIONS . = ALIGN(8192); __init_end = .; - .data.init_task : { *(.data.init_task) } /* The initial task and kernel stack */ - _end = . ; /* Sections to be discarded */
arch/m68k/kernel/vmlinux-sun3.lds +1 -1
@@ -24,6 +24,7 @@ SECTIONS _etext = .; /* End of text section */ .data : { /* Data */ + INIT_TASK_DATA(THREAD_SIZE) DATA_DATA CONSTRUCTORS . = ALIGN(16); /* Exception table */
@@ -70,7 +71,6 @@ __init_begin = .; #endif . = ALIGN(PAGE_SIZE); __init_end = .; - .data.init.task : { *(.data.init_task) } .bss : { *(.bss) } /* BSS */
Signature · 1 line
1.6.2.1