diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 06:46:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 06:46:14 -0500 |
commit | 5ea293a9048d3a58cb0c840fa719d85ad14cba47 (patch) | |
tree | 88d1dd1eece2cfcbd858ff2c00fb0240dcfab3c7 /include/asm-generic | |
parent | 03bc26cfefd6db756e6bc7fcda11dc17ada7be16 (diff) | |
parent | d3883ecebbf9e095b9e379dabbbe8b2c1ee7a41c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (79 commits)
Remove references to "make dep"
kconfig: document use of HAVE_*
Introduce new section reference annotations tags: __ref, __refdata, __refconst
kbuild: warn about ld added unique sections
kbuild: add verbose option to Section mismatch reporting in modpost
kconfig: tristate choices with mixed tristate and boolean values
asm-generic/vmlix.lds.h: simplify __mem{init,exit}* dependencies
remove __attribute_used__
kbuild: support ARCH=x86 in buildtar
kconfig: remove "enable"
kbuild: simplified warning report in modpost
kbuild: introduce a few helpers in modpost
kbuild: use simpler section mismatch warnings in modpost
kbuild: link vmlinux.o before kallsyms passes
kbuild: introduce new option to enhance section mismatch analysis
Use separate sections for __dev/__cpu/__mem code/data
compiler.h: introduce __section()
all archs: consolidate init and exit sections in vmlinux.lds.h
kbuild: check section names consistently in modpost
kbuild: introduce blacklisting in modpost
...
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 89 |
1 files changed, 87 insertions, 2 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 9f584cc5c5fb..76df771be585 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -9,10 +9,46 @@ | |||
9 | /* Align . to a 8 byte boundary equals to maximum function alignment. */ | 9 | /* Align . to a 8 byte boundary equals to maximum function alignment. */ |
10 | #define ALIGN_FUNCTION() . = ALIGN(8) | 10 | #define ALIGN_FUNCTION() . = ALIGN(8) |
11 | 11 | ||
12 | /* The actual configuration determine if the init/exit sections | ||
13 | * are handled as text/data or they can be discarded (which | ||
14 | * often happens at runtime) | ||
15 | */ | ||
16 | #ifdef CONFIG_HOTPLUG | ||
17 | #define DEV_KEEP(sec) *(.dev##sec) | ||
18 | #define DEV_DISCARD(sec) | ||
19 | #else | ||
20 | #define DEV_KEEP(sec) | ||
21 | #define DEV_DISCARD(sec) *(.dev##sec) | ||
22 | #endif | ||
23 | |||
24 | #ifdef CONFIG_HOTPLUG_CPU | ||
25 | #define CPU_KEEP(sec) *(.cpu##sec) | ||
26 | #define CPU_DISCARD(sec) | ||
27 | #else | ||
28 | #define CPU_KEEP(sec) | ||
29 | #define CPU_DISCARD(sec) *(.cpu##sec) | ||
30 | #endif | ||
31 | |||
32 | #if defined(CONFIG_MEMORY_HOTPLUG) | ||
33 | #define MEM_KEEP(sec) *(.mem##sec) | ||
34 | #define MEM_DISCARD(sec) | ||
35 | #else | ||
36 | #define MEM_KEEP(sec) | ||
37 | #define MEM_DISCARD(sec) *(.mem##sec) | ||
38 | #endif | ||
39 | |||
40 | |||
12 | /* .data section */ | 41 | /* .data section */ |
13 | #define DATA_DATA \ | 42 | #define DATA_DATA \ |
14 | *(.data) \ | 43 | *(.data) \ |
15 | *(.data.init.refok) \ | 44 | *(.data.init.refok) \ |
45 | *(.ref.data) \ | ||
46 | DEV_KEEP(init.data) \ | ||
47 | DEV_KEEP(exit.data) \ | ||
48 | CPU_KEEP(init.data) \ | ||
49 | CPU_KEEP(exit.data) \ | ||
50 | MEM_KEEP(init.data) \ | ||
51 | MEM_KEEP(exit.data) \ | ||
16 | . = ALIGN(8); \ | 52 | . = ALIGN(8); \ |
17 | VMLINUX_SYMBOL(__start___markers) = .; \ | 53 | VMLINUX_SYMBOL(__start___markers) = .; \ |
18 | *(__markers) \ | 54 | *(__markers) \ |
@@ -132,6 +168,17 @@ | |||
132 | *(__ksymtab_strings) \ | 168 | *(__ksymtab_strings) \ |
133 | } \ | 169 | } \ |
134 | \ | 170 | \ |
171 | /* __*init sections */ \ | ||
172 | __init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) { \ | ||
173 | *(.ref.rodata) \ | ||
174 | DEV_KEEP(init.rodata) \ | ||
175 | DEV_KEEP(exit.rodata) \ | ||
176 | CPU_KEEP(init.rodata) \ | ||
177 | CPU_KEEP(exit.rodata) \ | ||
178 | MEM_KEEP(init.rodata) \ | ||
179 | MEM_KEEP(exit.rodata) \ | ||
180 | } \ | ||
181 | \ | ||
135 | /* Built-in module parameters. */ \ | 182 | /* Built-in module parameters. */ \ |
136 | __param : AT(ADDR(__param) - LOAD_OFFSET) { \ | 183 | __param : AT(ADDR(__param) - LOAD_OFFSET) { \ |
137 | VMLINUX_SYMBOL(__start___param) = .; \ | 184 | VMLINUX_SYMBOL(__start___param) = .; \ |
@@ -139,7 +186,6 @@ | |||
139 | VMLINUX_SYMBOL(__stop___param) = .; \ | 186 | VMLINUX_SYMBOL(__stop___param) = .; \ |
140 | VMLINUX_SYMBOL(__end_rodata) = .; \ | 187 | VMLINUX_SYMBOL(__end_rodata) = .; \ |
141 | } \ | 188 | } \ |
142 | \ | ||
143 | . = ALIGN((align)); | 189 | . = ALIGN((align)); |
144 | 190 | ||
145 | /* RODATA provided for backward compatibility. | 191 | /* RODATA provided for backward compatibility. |
@@ -158,8 +204,16 @@ | |||
158 | #define TEXT_TEXT \ | 204 | #define TEXT_TEXT \ |
159 | ALIGN_FUNCTION(); \ | 205 | ALIGN_FUNCTION(); \ |
160 | *(.text) \ | 206 | *(.text) \ |
207 | *(.ref.text) \ | ||
161 | *(.text.init.refok) \ | 208 | *(.text.init.refok) \ |
162 | *(.exit.text.refok) | 209 | *(.exit.text.refok) \ |
210 | DEV_KEEP(init.text) \ | ||
211 | DEV_KEEP(exit.text) \ | ||
212 | CPU_KEEP(init.text) \ | ||
213 | CPU_KEEP(exit.text) \ | ||
214 | MEM_KEEP(init.text) \ | ||
215 | MEM_KEEP(exit.text) | ||
216 | |||
163 | 217 | ||
164 | /* sched.text is aling to function alignment to secure we have same | 218 | /* sched.text is aling to function alignment to secure we have same |
165 | * address even at second ld pass when generating System.map */ | 219 | * address even at second ld pass when generating System.map */ |
@@ -183,6 +237,37 @@ | |||
183 | *(.kprobes.text) \ | 237 | *(.kprobes.text) \ |
184 | VMLINUX_SYMBOL(__kprobes_text_end) = .; | 238 | VMLINUX_SYMBOL(__kprobes_text_end) = .; |
185 | 239 | ||
240 | /* init and exit section handling */ | ||
241 | #define INIT_DATA \ | ||
242 | *(.init.data) \ | ||
243 | DEV_DISCARD(init.data) \ | ||
244 | DEV_DISCARD(init.rodata) \ | ||
245 | CPU_DISCARD(init.data) \ | ||
246 | CPU_DISCARD(init.rodata) \ | ||
247 | MEM_DISCARD(init.data) \ | ||
248 | MEM_DISCARD(init.rodata) | ||
249 | |||
250 | #define INIT_TEXT \ | ||
251 | *(.init.text) \ | ||
252 | DEV_DISCARD(init.text) \ | ||
253 | CPU_DISCARD(init.text) \ | ||
254 | MEM_DISCARD(init.text) | ||
255 | |||
256 | #define EXIT_DATA \ | ||
257 | *(.exit.data) \ | ||
258 | DEV_DISCARD(exit.data) \ | ||
259 | DEV_DISCARD(exit.rodata) \ | ||
260 | CPU_DISCARD(exit.data) \ | ||
261 | CPU_DISCARD(exit.rodata) \ | ||
262 | MEM_DISCARD(exit.data) \ | ||
263 | MEM_DISCARD(exit.rodata) | ||
264 | |||
265 | #define EXIT_TEXT \ | ||
266 | *(.exit.text) \ | ||
267 | DEV_DISCARD(exit.text) \ | ||
268 | CPU_DISCARD(exit.text) \ | ||
269 | MEM_DISCARD(exit.text) | ||
270 | |||
186 | /* DWARF debug sections. | 271 | /* DWARF debug sections. |
187 | Symbols in the DWARF debugging sections are relative to | 272 | Symbols in the DWARF debugging sections are relative to |
188 | the beginning of the section so we begin them at 0. */ | 273 | the beginning of the section so we begin them at 0. */ |