Commit eccfbf98 authored by Tim Abbott's avatar Tim Abbott Committed by Chen Liqin

score: Cleanup linker script using new macros.

Signed-off-by: default avatarTim Abbott <tabbott@ksplice.com>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarChen Liqin <liqin.chen@sunplusct.com>
parent 0dab1006
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
*/ */
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
#include <asm/thread_info.h>
#include <asm/page.h>
OUTPUT_ARCH(score) OUTPUT_ARCH(score)
ENTRY(_stext) ENTRY(_stext)
...@@ -49,21 +51,9 @@ SECTIONS ...@@ -49,21 +51,9 @@ SECTIONS
. = ALIGN(16); . = ALIGN(16);
RODATA RODATA
/* Exception table */ EXCEPTION_TABLE(16)
. = ALIGN(16);
__ex_table : {
__start___ex_table = .;
*(__ex_table)
__stop___ex_table = .;
}
/* writeable */ RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE)
.data ALIGN (4096): {
*(.data.init_task)
DATA_DATA
CONSTRUCTORS
}
/* We want the small data sections together, so single-instruction offsets /* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so can access them all, and initialized data all before uninitialized, so
...@@ -72,45 +62,14 @@ SECTIONS ...@@ -72,45 +62,14 @@ SECTIONS
.sdata : { .sdata : {
*(.sdata) *(.sdata)
} }
. = ALIGN(32);
.data.cacheline_aligned : {
*(.data.cacheline_aligned)
}
_edata = .; /* End of data section */ _edata = .; /* End of data section */
/* will be freed after init */ /* will be freed after init */
. = ALIGN(4096); /* Init code and data */ . = ALIGN(PAGE_SIZE); /* Init code and data */
__init_begin = .; __init_begin = .;
. = ALIGN(4096); INIT_TEXT_SECTION(PAGE_SIZE)
.init.text : { INIT_DATA_SECTION(16)
_sinittext = .;
INIT_TEXT
_einittext = .;
}
.init.data : {
INIT_DATA
}
. = ALIGN(16);
.init.setup : {
__setup_start = .;
*(.init.setup)
__setup_end = .;
}
.initcall.init : {
__initcall_start = .;
INITCALLS
__initcall_end = .;
}
.con_initcall.init : {
__con_initcall_start = .;
*(.con_initcall.init)
__con_initcall_end = .;
}
SECURITY_INIT
/* .exit.text is discarded at runtime, not link time, to deal with /* .exit.text is discarded at runtime, not link time, to deal with
* references from .rodata * references from .rodata
...@@ -121,28 +80,10 @@ SECTIONS ...@@ -121,28 +80,10 @@ SECTIONS
.exit.data : { .exit.data : {
EXIT_DATA EXIT_DATA
} }
#if defined(CONFIG_BLK_DEV_INITRD) . = ALIGN(PAGE_SIZE);
.init.ramfs ALIGN(4096): {
__initramfs_start = .;
*(.init.ramfs)
__initramfs_end = .;
. = ALIGN(4);
LONG(0);
}
#endif
. = ALIGN(4096);
__init_end = .; __init_end = .;
/* freed after init ends here */ /* freed after init ends here */
__bss_start = .; /* BSS */ BSS_SECTION(0, 0, 0)
.sbss : {
*(.sbss)
*(.scommon)
}
.bss : {
*(.bss)
*(COMMON)
}
__bss_stop = .;
_end = .; _end = .;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment