diff options
author | Tim Abbott <tabbott@ksplice.com> | 2009-09-22 23:38:42 -0400 |
---|---|---|
committer | Chen Liqin <liqin.chen@sunplusct.com> | 2009-09-23 01:41:15 -0400 |
commit | eccfbf98f4d77bb5849dfb96f829f14d2b292551 (patch) | |
tree | c69a65c7b0ee95a078f20bed1f137f14b015cf35 /arch/score/kernel | |
parent | 0dab1006896ef43f55b82b83ec2316f0179f681b (diff) |
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>
Diffstat (limited to 'arch/score/kernel')
-rw-r--r-- | arch/score/kernel/vmlinux.lds.S | 77 |
1 files changed, 9 insertions, 68 deletions
diff --git a/arch/score/kernel/vmlinux.lds.S b/arch/score/kernel/vmlinux.lds.S index f85569831d5c..eebcbaa4e978 100644 --- a/arch/score/kernel/vmlinux.lds.S +++ b/arch/score/kernel/vmlinux.lds.S | |||
@@ -24,6 +24,8 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <asm-generic/vmlinux.lds.h> | 26 | #include <asm-generic/vmlinux.lds.h> |
27 | #include <asm/thread_info.h> | ||
28 | #include <asm/page.h> | ||
27 | 29 | ||
28 | OUTPUT_ARCH(score) | 30 | OUTPUT_ARCH(score) |
29 | ENTRY(_stext) | 31 | ENTRY(_stext) |
@@ -49,21 +51,9 @@ SECTIONS | |||
49 | . = ALIGN(16); | 51 | . = ALIGN(16); |
50 | RODATA | 52 | RODATA |
51 | 53 | ||
52 | /* Exception table */ | 54 | EXCEPTION_TABLE(16) |
53 | . = ALIGN(16); | ||
54 | __ex_table : { | ||
55 | __start___ex_table = .; | ||
56 | *(__ex_table) | ||
57 | __stop___ex_table = .; | ||
58 | } | ||
59 | 55 | ||
60 | /* writeable */ | 56 | RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE) |
61 | .data ALIGN (4096): { | ||
62 | *(.data.init_task) | ||
63 | |||
64 | DATA_DATA | ||
65 | CONSTRUCTORS | ||
66 | } | ||
67 | 57 | ||
68 | /* We want the small data sections together, so single-instruction offsets | 58 | /* We want the small data sections together, so single-instruction offsets |
69 | can access them all, and initialized data all before uninitialized, so | 59 | can access them all, and initialized data all before uninitialized, so |
@@ -72,45 +62,14 @@ SECTIONS | |||
72 | .sdata : { | 62 | .sdata : { |
73 | *(.sdata) | 63 | *(.sdata) |
74 | } | 64 | } |
75 | |||
76 | . = ALIGN(32); | ||
77 | .data.cacheline_aligned : { | ||
78 | *(.data.cacheline_aligned) | ||
79 | } | ||
80 | _edata = .; /* End of data section */ | 65 | _edata = .; /* End of data section */ |
81 | 66 | ||
82 | /* will be freed after init */ | 67 | /* will be freed after init */ |
83 | . = ALIGN(4096); /* Init code and data */ | 68 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
84 | __init_begin = .; | 69 | __init_begin = .; |
85 | 70 | ||
86 | . = ALIGN(4096); | 71 | INIT_TEXT_SECTION(PAGE_SIZE) |
87 | .init.text : { | 72 | INIT_DATA_SECTION(16) |
88 | _sinittext = .; | ||
89 | INIT_TEXT | ||
90 | _einittext = .; | ||
91 | } | ||
92 | .init.data : { | ||
93 | INIT_DATA | ||
94 | } | ||
95 | . = ALIGN(16); | ||
96 | .init.setup : { | ||
97 | __setup_start = .; | ||
98 | *(.init.setup) | ||
99 | __setup_end = .; | ||
100 | } | ||
101 | |||
102 | .initcall.init : { | ||
103 | __initcall_start = .; | ||
104 | INITCALLS | ||
105 | __initcall_end = .; | ||
106 | } | ||
107 | |||
108 | .con_initcall.init : { | ||
109 | __con_initcall_start = .; | ||
110 | *(.con_initcall.init) | ||
111 | __con_initcall_end = .; | ||
112 | } | ||
113 | SECURITY_INIT | ||
114 | 73 | ||
115 | /* .exit.text is discarded at runtime, not link time, to deal with | 74 | /* .exit.text is discarded at runtime, not link time, to deal with |
116 | * references from .rodata | 75 | * references from .rodata |
@@ -121,28 +80,10 @@ SECTIONS | |||
121 | .exit.data : { | 80 | .exit.data : { |
122 | EXIT_DATA | 81 | EXIT_DATA |
123 | } | 82 | } |
124 | #if defined(CONFIG_BLK_DEV_INITRD) | 83 | . = ALIGN(PAGE_SIZE); |
125 | .init.ramfs ALIGN(4096): { | ||
126 | __initramfs_start = .; | ||
127 | *(.init.ramfs) | ||
128 | __initramfs_end = .; | ||
129 | . = ALIGN(4); | ||
130 | LONG(0); | ||
131 | } | ||
132 | #endif | ||
133 | . = ALIGN(4096); | ||
134 | __init_end = .; | 84 | __init_end = .; |
135 | /* freed after init ends here */ | 85 | /* freed after init ends here */ |
136 | 86 | ||
137 | __bss_start = .; /* BSS */ | 87 | BSS_SECTION(0, 0, 0) |
138 | .sbss : { | ||
139 | *(.sbss) | ||
140 | *(.scommon) | ||
141 | } | ||
142 | .bss : { | ||
143 | *(.bss) | ||
144 | *(COMMON) | ||
145 | } | ||
146 | __bss_stop = .; | ||
147 | _end = .; | 88 | _end = .; |
148 | } | 89 | } |