aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/um/kernel/dyn.lds.S12
-rw-r--r--arch/um/kernel/uml.lds.S11
-rw-r--r--include/asm-um/common.lds.S124
3 files changed, 90 insertions, 57 deletions
diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S
index 24547741b205..41850906116e 100644
--- a/arch/um/kernel/dyn.lds.S
+++ b/arch/um/kernel/dyn.lds.S
@@ -71,11 +71,13 @@ SECTIONS
71 *(.gnu.warning) 71 *(.gnu.warning)
72 72
73 . = ALIGN(4096); 73 . = ALIGN(4096);
74 __syscall_stub_start = .;
75 *(.__syscall_stub*)
76 __syscall_stub_end = .;
77 . = ALIGN(4096);
78 } =0x90909090 74 } =0x90909090
75 . = ALIGN(4096);
76 .syscall_stub : {
77 __syscall_stub_start = .;
78 *(.__syscall_stub*)
79 __syscall_stub_end = .;
80 }
79 .fini : { 81 .fini : {
80 KEEP (*(.fini)) 82 KEEP (*(.fini))
81 } =0x90909090 83 } =0x90909090
@@ -138,8 +140,8 @@ SECTIONS
138 .got : { *(.got.plt) *(.got) } 140 .got : { *(.got.plt) *(.got) }
139 _edata = .; 141 _edata = .;
140 PROVIDE (edata = .); 142 PROVIDE (edata = .);
141 __bss_start = .;
142 .bss : { 143 .bss : {
144 __bss_start = .;
143 *(.dynbss) 145 *(.dynbss)
144 *(.bss .bss.* .gnu.linkonce.b.*) 146 *(.bss .bss.* .gnu.linkonce.b.*)
145 *(COMMON) 147 *(COMMON)
diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S
index 307b9373676b..81acdc24348e 100644
--- a/arch/um/kernel/uml.lds.S
+++ b/arch/um/kernel/uml.lds.S
@@ -44,12 +44,13 @@ SECTIONS
44 /* .gnu.warning sections are handled specially by elf32.em. */ 44 /* .gnu.warning sections are handled specially by elf32.em. */
45 *(.gnu.warning) 45 *(.gnu.warning)
46 *(.gnu.linkonce.t*) 46 *(.gnu.linkonce.t*)
47 }
47 48
48 . = ALIGN(4096); 49 . = ALIGN(4096);
49 __syscall_stub_start = .; 50 .syscall_stub : {
50 *(.__syscall_stub*) 51 __syscall_stub_start = .;
51 __syscall_stub_end = .; 52 *(.__syscall_stub*)
52 . = ALIGN(4096); 53 __syscall_stub_end = .;
53 } 54 }
54 55
55 #include "asm/common.lds.S" 56 #include "asm/common.lds.S"
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/ : {