Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

score: Cleanup linker script using new macros.

Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Chen Liqin <liqin.chen@sunplusct.com>

authored by

Tim Abbott and committed by
Chen Liqin
eccfbf98 0dab1006

+9 -68
+9 -68
arch/score/kernel/vmlinux.lds.S
··· 24 24 */ 25 25 26 26 #include <asm-generic/vmlinux.lds.h> 27 + #include <asm/thread_info.h> 28 + #include <asm/page.h> 27 29 28 30 OUTPUT_ARCH(score) 29 31 ENTRY(_stext) ··· 51 49 . = ALIGN(16); 52 50 RODATA 53 51 54 - /* Exception table */ 55 - . = ALIGN(16); 56 - __ex_table : { 57 - __start___ex_table = .; 58 - *(__ex_table) 59 - __stop___ex_table = .; 60 - } 52 + EXCEPTION_TABLE(16) 61 53 62 - /* writeable */ 63 - .data ALIGN (4096): { 64 - *(.data.init_task) 65 - 66 - DATA_DATA 67 - CONSTRUCTORS 68 - } 54 + RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE) 69 55 70 56 /* We want the small data sections together, so single-instruction offsets 71 57 can access them all, and initialized data all before uninitialized, so ··· 62 72 .sdata : { 63 73 *(.sdata) 64 74 } 65 - 66 - . = ALIGN(32); 67 - .data.cacheline_aligned : { 68 - *(.data.cacheline_aligned) 69 - } 70 75 _edata = .; /* End of data section */ 71 76 72 77 /* will be freed after init */ 73 - . = ALIGN(4096); /* Init code and data */ 78 + . = ALIGN(PAGE_SIZE); /* Init code and data */ 74 79 __init_begin = .; 75 80 76 - . = ALIGN(4096); 77 - .init.text : { 78 - _sinittext = .; 79 - INIT_TEXT 80 - _einittext = .; 81 - } 82 - .init.data : { 83 - INIT_DATA 84 - } 85 - . = ALIGN(16); 86 - .init.setup : { 87 - __setup_start = .; 88 - *(.init.setup) 89 - __setup_end = .; 90 - } 91 - 92 - .initcall.init : { 93 - __initcall_start = .; 94 - INITCALLS 95 - __initcall_end = .; 96 - } 97 - 98 - .con_initcall.init : { 99 - __con_initcall_start = .; 100 - *(.con_initcall.init) 101 - __con_initcall_end = .; 102 - } 103 - SECURITY_INIT 81 + INIT_TEXT_SECTION(PAGE_SIZE) 82 + INIT_DATA_SECTION(16) 104 83 105 84 /* .exit.text is discarded at runtime, not link time, to deal with 106 85 * references from .rodata ··· 80 121 .exit.data : { 81 122 EXIT_DATA 82 123 } 83 - #if defined(CONFIG_BLK_DEV_INITRD) 84 - .init.ramfs ALIGN(4096): { 85 - __initramfs_start = .; 86 - *(.init.ramfs) 87 - __initramfs_end = .; 88 - . = ALIGN(4); 89 - LONG(0); 90 - } 91 - #endif 92 - . = ALIGN(4096); 124 + . = ALIGN(PAGE_SIZE); 93 125 __init_end = .; 94 126 /* freed after init ends here */ 95 127 96 - __bss_start = .; /* BSS */ 97 - .sbss : { 98 - *(.sbss) 99 - *(.scommon) 100 - } 101 - .bss : { 102 - *(.bss) 103 - *(COMMON) 104 - } 105 - __bss_stop = .; 128 + BSS_SECTION(0, 0, 0) 106 129 _end = .; 107 130 }