aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-um/common.lds.S
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-08-31 02:56:17 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-31 04:42:22 -0400
commitc7ec16da5adc1c1b341b2a83bde7add17dcf811a (patch)
tree4e11748671da5c83c894f1fe96ce999f33b52e7d /include/asm-um/common.lds.S
parent641916881322a2dee5b120d509a3bdd05a502510 (diff)
uml: fix linker script alignment bugs
Fix a class of bugs in the UML linker scripts which caused section boundary variables to sometimes not line up with their sections. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-um/common.lds.S')
-rw-r--r--include/asm-um/common.lds.S124
1 files changed, 77 insertions, 47 deletions
diff --git a/include/asm-um/common.lds.S b/include/asm-um/common.lds.S
index e3f010bd12b3..cb0248616d49 100644
--- a/include/asm-um/common.lds.S
+++ b/include/asm-um/common.lds.S
@@ -16,82 +16,112 @@
16 16
17 . = ALIGN(4096); 17 . = ALIGN(4096);
18 .note : { *(.note.*) } 18 .note : { *(.note.*) }
19 __start___ex_table = .; 19 __ex_table : {
20 __ex_table : { *(__ex_table) } 20 __start___ex_table = .;
21 __stop___ex_table = .; 21 *(__ex_table)
22 __stop___ex_table = .;
23 }
22 24
23 BUG_TABLE 25 BUG_TABLE
24 26
25 __uml_setup_start = .; 27 .uml.setup.init : {
26 .uml.setup.init : { *(.uml.setup.init) } 28 __uml_setup_start = .;
27 __uml_setup_end = .; 29 *(.uml.setup.init)
30 __uml_setup_end = .;
31 }
28 32
29 __uml_help_start = .; 33 .uml.help.init : {
30 .uml.help.init : { *(.uml.help.init) } 34 __uml_help_start = .;
31 __uml_help_end = .; 35 *(.uml.help.init)
36 __uml_help_end = .;
37 }
32 38
33 __uml_postsetup_start = .; 39 .uml.postsetup.init : {
34 .uml.postsetup.init : { *(.uml.postsetup.init) } 40 __uml_postsetup_start = .;
35 __uml_postsetup_end = .; 41 *(.uml.postsetup.init)
42 __uml_postsetup_end = .;
43 }
36 44
37 __setup_start = .; 45 .init.setup : {
38 .init.setup : { *(.init.setup) } 46 __setup_start = .;
39 __setup_end = .; 47 *(.init.setup)
48 __setup_end = .;
49 }
40 50
41 . = ALIGN(32); 51 . = ALIGN(32);
42 __per_cpu_start = . ; 52 .data.percpu : {
43 .data.percpu : { *(.data.percpu) } 53 __per_cpu_start = . ;
44 __per_cpu_end = . ; 54 *(.data.percpu)
55 __per_cpu_end = . ;
56 }
45 57
46 __initcall_start = .;
47 .initcall.init : { 58 .initcall.init : {
59 __initcall_start = .;
48 INITCALLS 60 INITCALLS
61 __initcall_end = .;
49 } 62 }
50 __initcall_end = .;
51 63
52 __con_initcall_start = .; 64 .con_initcall.init : {
53 .con_initcall.init : { *(.con_initcall.init) } 65 __con_initcall_start = .;
54 __con_initcall_end = .; 66 *(.con_initcall.init)
67 __con_initcall_end = .;
68 }
55 69
56 __uml_initcall_start = .; 70 .uml.initcall.init : {
57 .uml.initcall.init : { *(.uml.initcall.init) } 71 __uml_initcall_start = .;
58 __uml_initcall_end = .; 72 *(.uml.initcall.init)
73 __uml_initcall_end = .;
74 }
59 __init_end = .; 75 __init_end = .;
60 76
61 SECURITY_INIT 77 SECURITY_INIT
62 78
63 __exitcall_begin = .; 79 .exitcall : {
64 .exitcall : { *(.exitcall.exit) } 80 __exitcall_begin = .;
65 __exitcall_end = .; 81 *(.exitcall.exit)
82 __exitcall_end = .;
83 }
66 84
67 __uml_exitcall_begin = .; 85 .uml.exitcall : {
68 .uml.exitcall : { *(.uml.exitcall.exit) } 86 __uml_exitcall_begin = .;
69 __uml_exitcall_end = .; 87 *(.uml.exitcall.exit)
88 __uml_exitcall_end = .;
89 }
70 90
71 . = ALIGN(4); 91 . = ALIGN(4);
72 __alt_instructions = .; 92 .altinstructions : {
73 .altinstructions : { *(.altinstructions) } 93 __alt_instructions = .;
74 __alt_instructions_end = .; 94 *(.altinstructions)
95 __alt_instructions_end = .;
96 }
75 .altinstr_replacement : { *(.altinstr_replacement) } 97 .altinstr_replacement : { *(.altinstr_replacement) }
76 /* .exit.text is discard at runtime, not link time, to deal with references 98 /* .exit.text is discard at runtime, not link time, to deal with references
77 from .altinstructions and .eh_frame */ 99 from .altinstructions and .eh_frame */
78 .exit.text : { *(.exit.text) } 100 .exit.text : { *(.exit.text) }
79 .exit.data : { *(.exit.data) } 101 .exit.data : { *(.exit.data) }
80 102
81 __preinit_array_start = .; 103 .preinit_array : {
82 .preinit_array : { *(.preinit_array) } 104 __preinit_array_start = .;
83 __preinit_array_end = .; 105 *(.preinit_array)
84 __init_array_start = .; 106 __preinit_array_end = .;
85 .init_array : { *(.init_array) } 107 }
86 __init_array_end = .; 108 .init_array : {
87 __fini_array_start = .; 109 __init_array_start = .;
88 .fini_array : { *(.fini_array) } 110 *(.init_array)
89 __fini_array_end = .; 111 __init_array_end = .;
112 }
113 .fini_array : {
114 __fini_array_start = .;
115 *(.fini_array)
116 __fini_array_end = .;
117 }
90 118
91 . = ALIGN(4096); 119 . = ALIGN(4096);
92 __initramfs_start = .; 120 .init.ramfs : {
93 .init.ramfs : { *(.init.ramfs) } 121 __initramfs_start = .;
94 __initramfs_end = .; 122 *(.init.ramfs)
123 __initramfs_end = .;
124 }
95 125
96 /* Sections to be discarded */ 126 /* Sections to be discarded */
97 /DISCARD/ : { 127 /DISCARD/ : {