diff options
author | Nelson Elhage <nelhage@ksplice.com> | 2009-07-31 16:58:19 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-09-17 14:07:49 -0400 |
commit | 6eb10bc9e2deab06630261cd05c4cb1e9a60e980 (patch) | |
tree | 730fbb55fbc4cb328f0d4502886b50e5d1be2788 /arch/mips/kernel/vmlinux.lds.S | |
parent | a0b54e256d513ed99e456bea6e4e188ff92e7c46 (diff) |
MIPS: Clean up linker script using new linker script macros.
This patch results in fewer output sections and in some data being
reordered, but should have no functional impact.
Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/mips/kernel/vmlinux.lds.S | 86 |
1 files changed, 8 insertions, 78 deletions
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index ae8c1976df5f..2769bed3d2af 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
@@ -43,13 +43,7 @@ SECTIONS | |||
43 | } :text = 0 | 43 | } :text = 0 |
44 | _etext = .; /* End of text section */ | 44 | _etext = .; /* End of text section */ |
45 | 45 | ||
46 | /* Exception table */ | 46 | EXCEPTION_TABLE(16) |
47 | . = ALIGN(16); | ||
48 | __ex_table : { | ||
49 | __start___ex_table = .; | ||
50 | *(__ex_table) | ||
51 | __stop___ex_table = .; | ||
52 | } | ||
53 | 47 | ||
54 | /* Exception table for data bus errors */ | 48 | /* Exception table for data bus errors */ |
55 | __dbe_table : { | 49 | __dbe_table : { |
@@ -66,20 +60,10 @@ SECTIONS | |||
66 | /* writeable */ | 60 | /* writeable */ |
67 | .data : { /* Data */ | 61 | .data : { /* Data */ |
68 | . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ | 62 | . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ |
69 | /* | ||
70 | * This ALIGN is needed as a workaround for a bug a | ||
71 | * gcc bug upto 4.1 which limits the maximum alignment | ||
72 | * to at most 32kB and results in the following | ||
73 | * warning: | ||
74 | * | ||
75 | * CC arch/mips/kernel/init_task.o | ||
76 | * arch/mips/kernel/init_task.c:30: warning: alignment | ||
77 | * of ‘init_thread_union’ is greater than maximum | ||
78 | * object file alignment. Using 32768 | ||
79 | */ | ||
80 | . = ALIGN(PAGE_SIZE); | ||
81 | *(.data.init_task) | ||
82 | 63 | ||
64 | INIT_TASK_DATA(PAGE_SIZE) | ||
65 | NOSAVE_DATA | ||
66 | CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT) | ||
83 | DATA_DATA | 67 | DATA_DATA |
84 | CONSTRUCTORS | 68 | CONSTRUCTORS |
85 | } | 69 | } |
@@ -96,51 +80,13 @@ SECTIONS | |||
96 | .sdata : { | 80 | .sdata : { |
97 | *(.sdata) | 81 | *(.sdata) |
98 | } | 82 | } |
99 | |||
100 | . = ALIGN(PAGE_SIZE); | ||
101 | .data_nosave : { | ||
102 | __nosave_begin = .; | ||
103 | *(.data.nosave) | ||
104 | } | ||
105 | . = ALIGN(PAGE_SIZE); | ||
106 | __nosave_end = .; | ||
107 | |||
108 | . = ALIGN(1 << CONFIG_MIPS_L1_CACHE_SHIFT); | ||
109 | .data.cacheline_aligned : { | ||
110 | *(.data.cacheline_aligned) | ||
111 | } | ||
112 | _edata = .; /* End of data section */ | 83 | _edata = .; /* End of data section */ |
113 | 84 | ||
114 | /* will be freed after init */ | 85 | /* will be freed after init */ |
115 | . = ALIGN(PAGE_SIZE); /* Init code and data */ | 86 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
116 | __init_begin = .; | 87 | __init_begin = .; |
117 | .init.text : { | 88 | INIT_TEXT_SECTION(PAGE_SIZE) |
118 | _sinittext = .; | 89 | INIT_DATA_SECTION(16) |
119 | INIT_TEXT | ||
120 | _einittext = .; | ||
121 | } | ||
122 | .init.data : { | ||
123 | INIT_DATA | ||
124 | } | ||
125 | . = ALIGN(16); | ||
126 | .init.setup : { | ||
127 | __setup_start = .; | ||
128 | *(.init.setup) | ||
129 | __setup_end = .; | ||
130 | } | ||
131 | |||
132 | .initcall.init : { | ||
133 | __initcall_start = .; | ||
134 | INITCALLS | ||
135 | __initcall_end = .; | ||
136 | } | ||
137 | |||
138 | .con_initcall.init : { | ||
139 | __con_initcall_start = .; | ||
140 | *(.con_initcall.init) | ||
141 | __con_initcall_end = .; | ||
142 | } | ||
143 | SECURITY_INIT | ||
144 | 90 | ||
145 | /* .exit.text is discarded at runtime, not link time, to deal with | 91 | /* .exit.text is discarded at runtime, not link time, to deal with |
146 | * references from .rodata | 92 | * references from .rodata |
@@ -151,29 +97,13 @@ SECTIONS | |||
151 | .exit.data : { | 97 | .exit.data : { |
152 | EXIT_DATA | 98 | EXIT_DATA |
153 | } | 99 | } |
154 | #if defined(CONFIG_BLK_DEV_INITRD) | 100 | |
155 | . = ALIGN(PAGE_SIZE); | ||
156 | .init.ramfs : { | ||
157 | __initramfs_start = .; | ||
158 | *(.init.ramfs) | ||
159 | __initramfs_end = .; | ||
160 | } | ||
161 | #endif | ||
162 | PERCPU(PAGE_SIZE) | 101 | PERCPU(PAGE_SIZE) |
163 | . = ALIGN(PAGE_SIZE); | 102 | . = ALIGN(PAGE_SIZE); |
164 | __init_end = .; | 103 | __init_end = .; |
165 | /* freed after init ends here */ | 104 | /* freed after init ends here */ |
166 | 105 | ||
167 | __bss_start = .; /* BSS */ | 106 | BSS_SECTION(0, 0, 0) |
168 | .sbss : { | ||
169 | *(.sbss) | ||
170 | *(.scommon) | ||
171 | } | ||
172 | .bss : { | ||
173 | *(.bss) | ||
174 | *(COMMON) | ||
175 | } | ||
176 | __bss_stop = .; | ||
177 | 107 | ||
178 | _end = . ; | 108 | _end = . ; |
179 | 109 | ||