aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2007-10-16 04:26:35 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:03 -0400
commitb2b5d37d7ee1592046ef75986c6d37ee9d55a61b (patch)
treeeedd9c12c7a0aa84252ad8f42d2c13d5e9ef39eb /arch/alpha/kernel
parenta5f833f3c1961488733bf645b011b6350ee5c7be (diff)
alpha: beautify vmlinux.lds
Introduced a consistent style in vmlinux.lds and it now matches the soon-to-be common style for all arch's vmlinux.lds files. In addition: - Replaced hardcoded constant with PAGE_SIZE - Fix page.h so PAGE_SIZE can be used from assembler and in lds files - Move a few labels inside brackets so linker alignment will not make label point ot a too low address - Replaced DWARF and STABS sections with definitions from asm-generic Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/alpha/kernel')
-rw-r--r--arch/alpha/kernel/vmlinux.lds.S260
1 files changed, 134 insertions, 126 deletions
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index 7af07d3ad5f0..55c05b511f4c 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -1,4 +1,5 @@
1#include <asm-generic/vmlinux.lds.h> 1#include <asm-generic/vmlinux.lds.h>
2#include <asm/page.h>
2 3
3OUTPUT_FORMAT("elf64-alpha") 4OUTPUT_FORMAT("elf64-alpha")
4OUTPUT_ARCH(alpha) 5OUTPUT_ARCH(alpha)
@@ -8,138 +9,145 @@ jiffies = jiffies_64;
8SECTIONS 9SECTIONS
9{ 10{
10#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS 11#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS
11 . = 0xfffffc0000310000; 12 . = 0xfffffc0000310000;
12#else 13#else
13 . = 0xfffffc0001010000; 14 . = 0xfffffc0001010000;
14#endif 15#endif
15 16
16 _text = .; /* Text and read-only data */ 17 _text = .; /* Text and read-only data */
17 .text : { 18 .text : {
18 *(.text.head) 19 *(.text.head)
19 TEXT_TEXT 20 TEXT_TEXT
20 SCHED_TEXT 21 SCHED_TEXT
21 LOCK_TEXT 22 LOCK_TEXT
22 *(.fixup) 23 *(.fixup)
23 *(.gnu.warning) 24 *(.gnu.warning)
24 } :kernel 25 } :kernel
25 _etext = .; /* End of text section */ 26 _etext = .; /* End of text section */
26 27
27 . = ALIGN(16); 28 /* Exception table */
28 __start___ex_table = .; /* Exception table */ 29 . = ALIGN(16);
29 __ex_table : { *(__ex_table) } 30 __ex_table : {
30 __stop___ex_table = .; 31 __start___ex_table = .;
31 32 *(__ex_table)
32 NOTES :kernel :note 33 __stop___ex_table = .;
33 .dummy : { *(.dummy) } :kernel 34 }
34 35
35 RODATA 36 NOTES :kernel :note
36 37 .dummy : {
37 /* Will be freed after init */ 38 *(.dummy)
38 . = ALIGN(8192); /* Init code and data */ 39 } :kernel
39 __init_begin = .; 40
40 .init.text : { 41 RODATA
41 _sinittext = .; 42
42 *(.init.text) 43 /* Will be freed after init */
43 _einittext = .; 44 . = ALIGN(PAGE_SIZE);
44 } 45 /* Init code and data */
45 .init.data : { *(.init.data) } 46 __init_begin = .;
46 47 .init.text : {
47 . = ALIGN(16); 48 _sinittext = .;
48 __setup_start = .; 49 *(.init.text)
49 .init.setup : { *(.init.setup) } 50 _einittext = .;
50 __setup_end = .; 51 }
51 52 .init.data : {
52 . = ALIGN(8); 53 *(.init.data)
53 __initcall_start = .; 54 }
54 .initcall.init : { 55
55 INITCALLS 56 . = ALIGN(16);
56 } 57 .init.setup : {
57 __initcall_end = .; 58 __setup_start = .;
59 *(.init.setup)
60 __setup_end = .;
61 }
62
63 . = ALIGN(8);
64 .initcall.init : {
65 __initcall_start = .;
66 INITCALLS
67 __initcall_end = .;
68 }
58 69
59#ifdef CONFIG_BLK_DEV_INITRD 70#ifdef CONFIG_BLK_DEV_INITRD
60 . = ALIGN(8192); 71 . = ALIGN(PAGE_SIZE);
61 __initramfs_start = .; 72 .init.ramfs : {
62 .init.ramfs : { *(.init.ramfs) } 73 __initramfs_start = .;
63 __initramfs_end = .; 74 *(.init.ramfs)
75 __initramfs_end = .;
76 }
64#endif 77#endif
65 78
66 . = ALIGN(8); 79 . = ALIGN(8);
67 .con_initcall.init : { 80 .con_initcall.init : {
68 __con_initcall_start = .; 81 __con_initcall_start = .;
69 *(.con_initcall.init) 82 *(.con_initcall.init)
70 __con_initcall_end = .; 83 __con_initcall_end = .;
71 } 84 }
72 85
73 . = ALIGN(8); 86 . = ALIGN(8);
74 SECURITY_INIT 87 SECURITY_INIT
75 88
76 PERCPU(8192) 89 PERCPU(PAGE_SIZE)
77 90
78 . = ALIGN(2*8192); 91 . = ALIGN(2 * PAGE_SIZE);
79 __init_end = .; 92 __init_end = .;
80 /* Freed after init ends here */ 93 /* Freed after init ends here */
81 94
82 /* Note 2 page alignment above. */ 95 /* Note 2 page alignment above. */
83 .data.init_thread : { *(.data.init_thread) } 96 .data.init_thread : {
84 97 *(.data.init_thread)
85 . = ALIGN(8192); 98 }
86 .data.page_aligned : { *(.data.page_aligned) } 99
87 100 . = ALIGN(PAGE_SIZE);
88 . = ALIGN(64); 101 .data.page_aligned : {
89 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 102 *(.data.page_aligned)
90 103 }
91 _data = .; 104
92 .data : { /* Data */ 105 . = ALIGN(64);
93 DATA_DATA 106 .data.cacheline_aligned : {
94 CONSTRUCTORS 107 *(.data.cacheline_aligned)
95 } 108 }
96 109
97 .got : { *(.got) } 110 _data = .;
98 .sdata : { *(.sdata) } 111 /* Data */
99 112 .data : {
100 _edata = .; /* End of data section */ 113 DATA_DATA
101 114 CONSTRUCTORS
102 __bss_start = .; 115 }
103 .sbss : { *(.sbss) *(.scommon) } 116
104 .bss : { *(.bss) *(COMMON) } 117 .got : {
105 __bss_stop = .; 118 *(.got)
106 119 }
107 _end = .; 120 .sdata : {
108 121 *(.sdata)
109 /* Sections to be discarded */ 122 }
110 /DISCARD/ : { *(.exit.text) *(.exit.data) *(.exitcall.exit) } 123 _edata = .; /* End of data section */
111 124
112 .mdebug 0 : { *(.mdebug) } 125 __bss_start = .;
113 .note 0 : { *(.note) } 126 .sbss : {
114 .comment 0 : { *(.comment) } 127 *(.sbss)
115 128 *(.scommon)
116 /* Stabs debugging sections */ 129 }
117 .stab 0 : { *(.stab) } 130 .bss : {
118 .stabstr 0 : { *(.stabstr) } 131 *(.bss)
119 .stab.excl 0 : { *(.stab.excl) } 132 *(COMMON)
120 .stab.exclstr 0 : { *(.stab.exclstr) } 133 }
121 .stab.index 0 : { *(.stab.index) } 134 __bss_stop = .;
122 .stab.indexstr 0 : { *(.stab.indexstr) } 135 _end = .;
123 /* DWARF 1 */ 136
124 .debug 0 : { *(.debug) } 137 /* Sections to be discarded */
125 .line 0 : { *(.line) } 138 /DISCARD/ : {
126 /* GNU DWARF 1 extensions */ 139 *(.exit.text)
127 .debug_srcinfo 0 : { *(.debug_srcinfo) } 140 *(.exit.data)
128 .debug_sfnames 0 : { *(.debug_sfnames) } 141 *(.exitcall.exit)
129 /* DWARF 1.1 and DWARF 2 */ 142 }
130 .debug_aranges 0 : { *(.debug_aranges) } 143
131 .debug_pubnames 0 : { *(.debug_pubnames) } 144 .mdebug 0 : {
132 /* DWARF 2 */ 145 *(.mdebug)
133 .debug_info 0 : { *(.debug_info) } 146 }
134 .debug_abbrev 0 : { *(.debug_abbrev) } 147 .note 0 : {
135 .debug_line 0 : { *(.debug_line) } 148 *(.note)
136 .debug_frame 0 : { *(.debug_frame) } 149 }
137 .debug_str 0 : { *(.debug_str) } 150
138 .debug_loc 0 : { *(.debug_loc) } 151 STABS_DEBUG
139 .debug_macinfo 0 : { *(.debug_macinfo) } 152 DWARF_DEBUG
140 /* SGI/MIPS DWARF 2 extensions */
141 .debug_weaknames 0 : { *(.debug_weaknames) }
142 .debug_funcnames 0 : { *(.debug_funcnames) }
143 .debug_typenames 0 : { *(.debug_typenames) }
144 .debug_varnames 0 : { *(.debug_varnames) }
145} 153}