section name cleanup for h8300
cover section name cleanup for h8300
This patch series cleans up the section names on the h8300 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):
h8300: use new macros for .data.init_task.
h8300: use .head.text for compressed bootloader.
arch/h8300/boot/compressed/head.S | 3 ++- arch/h8300/boot/compressed/vmlinux.lds | 2 +- arch/h8300/kernel/init_task.c | 3 +-- arch/h8300/kernel/vmlinux.lds.S | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-)
PATCH 1/2 h8300: use new macros for .data.init_task.
--- arch/h8300/kernel/init_task.c | 3 +-- arch/h8300/kernel/vmlinux.lds.S | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
arch/h8300/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/h8300/kernel/vmlinux.lds.S +1 -2
@@ -100,8 +100,7 @@ SECTIONS __sdata = . ; ___data_start = . ; - . = ALIGN(0x2000) ; - *(.data.init_task) + INIT_TASK_DATA(0x2000) . = ALIGN(0x4) ; DATA_DATA . = ALIGN(0x4) ;
Signature · 1 line
1.6.2.1
PATCH 2/2 h8300: use .head.text for compressed bootloader.
--- arch/h8300/boot/compressed/head.S | 3 ++- arch/h8300/boot/compressed/vmlinux.lds | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
arch/h8300/boot/compressed/head.S +2 -1
@@ -5,11 +5,12 @@ */ .h8300h +#include <linux/init.h> #include <linux/linkage.h> #define SRAM_START 0xff4000 - .section .text.startup + __HEAD .global startup startup: mov.l #SRAM_START+0x8000, sp
arch/h8300/boot/compressed/vmlinux.lds +1 -1
@@ -4,7 +4,7 @@ SECTIONS { __stext = . ; __text = .; - *(.text.startup) + *(.head.text) *(.text) __etext = . ; }
Signature · 1 line
1.6.2.1