提交 2802e345 编写于 作者: T Tim Abbott 提交者: Paul Mundt

sh: Clean up linker script using new linker script macros.

This patch converts the sh architecture to use the new linker script
macros in include/asm-generic/vmlinux.lds.h.
Signed-off-by: NTim Abbott <tabbott@ksplice.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-sh@vger.kernel.org
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 727dc3fd
...@@ -50,12 +50,7 @@ SECTIONS ...@@ -50,12 +50,7 @@ SECTIONS
_etext = .; /* End of text section */ _etext = .; /* End of text section */
} = 0x0009 } = 0x0009
. = ALIGN(16); /* Exception table */ EXCEPTION_TABLE(16)
__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
__start___ex_table = .;
*(__ex_table)
__stop___ex_table = .;
}
NOTES NOTES
RO_DATA(PAGE_SIZE) RO_DATA(PAGE_SIZE)
...@@ -71,69 +66,14 @@ SECTIONS ...@@ -71,69 +66,14 @@ SECTIONS
__uncached_end = .; __uncached_end = .;
} }
. = ALIGN(THREAD_SIZE); RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
.data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */
*(.data.init_task)
. = ALIGN(L1_CACHE_BYTES);
*(.data.cacheline_aligned)
. = ALIGN(L1_CACHE_BYTES);
*(.data.read_mostly)
. = ALIGN(PAGE_SIZE);
*(.data.page_aligned)
__nosave_begin = .;
*(.data.nosave)
. = ALIGN(PAGE_SIZE);
__nosave_end = .;
DATA_DATA
CONSTRUCTORS
}
_edata = .; /* End of data section */ _edata = .; /* End of data section */
. = ALIGN(PAGE_SIZE); /* Init code and data */ . = ALIGN(PAGE_SIZE); /* Init code and data */
.init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { __init_begin = .;
__init_begin = .; INIT_TEXT_SECTION(PAGE_SIZE)
_sinittext = .; INIT_DATA_SECTION(16)
INIT_TEXT
_einittext = .;
}
.init.data : AT(ADDR(.init.data) - LOAD_OFFSET) { INIT_DATA }
. = ALIGN(16);
.init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
__setup_start = .;
*(.init.setup)
__setup_end = .;
}
.initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
__initcall_start = .;
INITCALLS
__initcall_end = .;
}
.con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
__con_initcall_start = .;
*(.con_initcall.init)
__con_initcall_end = .;
}
SECURITY_INIT
#ifdef CONFIG_BLK_DEV_INITRD
. = ALIGN(PAGE_SIZE);
.init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
__initramfs_start = .;
*(.init.ramfs)
__initramfs_end = .;
}
#endif
. = ALIGN(4); . = ALIGN(4);
.machvec.init : AT(ADDR(.machvec.init) - LOAD_OFFSET) { .machvec.init : AT(ADDR(.machvec.init) - LOAD_OFFSET) {
...@@ -152,16 +92,11 @@ SECTIONS ...@@ -152,16 +92,11 @@ SECTIONS
.exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { EXIT_DATA } .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { EXIT_DATA }
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
.bss : AT(ADDR(.bss) - LOAD_OFFSET) { __init_end = .;
__init_end = .; BSS(PAGE_SIZE)
__bss_start = .; /* BSS */ . = ALIGN(4);
*(.bss.page_aligned) _ebss = .; /* uClinux MTD sucks */
*(.bss) _end = . ;
*(COMMON)
. = ALIGN(4);
_ebss = .; /* uClinux MTD sucks */
_end = . ;
}
/* /*
* When something in the kernel is NOT compiled as a module, the * When something in the kernel is NOT compiled as a module, the
...@@ -170,7 +105,7 @@ SECTIONS ...@@ -170,7 +105,7 @@ SECTIONS
* it's a module. * it's a module.
*/ */
/DISCARD/ : { /DISCARD/ : {
*(.exitcall.exit) EXIT_CALL
} }
STABS_DEBUG STABS_DEBUG
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册