Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | |
| 2 | #include <asm/cache.h> |
| 3 | #include <asm/ptrace.h> |
| 4 | #include <asm/system.h> |
| 5 | #include <asm/pgtable.h> |
| 6 | |
| 7 | #define LOAD_OFFSET (KERNEL_START - KERNEL_TR_PAGE_SIZE) |
| 8 | #include <asm-generic/vmlinux.lds.h> |
| 9 | |
Keshavamurthy Anil S | c7b645f | 2005-06-27 15:17:16 -0700 | [diff] [blame] | 10 | #define IVT_TEXT \ |
| 11 | VMLINUX_SYMBOL(__start_ivt_text) = .; \ |
| 12 | *(.text.ivt) \ |
| 13 | VMLINUX_SYMBOL(__end_ivt_text) = .; |
| 14 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | OUTPUT_FORMAT("elf64-ia64-little") |
| 16 | OUTPUT_ARCH(ia64) |
| 17 | ENTRY(phys_start) |
| 18 | jiffies = jiffies_64; |
| 19 | PHDRS { |
| 20 | code PT_LOAD; |
| 21 | percpu PT_LOAD; |
| 22 | data PT_LOAD; |
David Mosberger-Tang | 336cdba8 | 2007-08-09 11:53:15 -0600 | [diff] [blame^] | 23 | note PT_NOTE; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | } |
| 25 | SECTIONS |
| 26 | { |
| 27 | /* Sections to be discarded */ |
| 28 | /DISCARD/ : { |
| 29 | *(.exit.text) |
| 30 | *(.exit.data) |
| 31 | *(.exitcall.exit) |
| 32 | *(.IA_64.unwind.exit.text) |
| 33 | *(.IA_64.unwind_info.exit.text) |
| 34 | } |
| 35 | |
| 36 | v = PAGE_OFFSET; /* this symbol is here to make debugging easier... */ |
| 37 | phys_start = _start - LOAD_OFFSET; |
| 38 | |
| 39 | code : { } :code |
| 40 | . = KERNEL_START; |
| 41 | |
| 42 | _text = .; |
| 43 | _stext = .; |
| 44 | |
| 45 | .text : AT(ADDR(.text) - LOAD_OFFSET) |
| 46 | { |
Keshavamurthy Anil S | c7b645f | 2005-06-27 15:17:16 -0700 | [diff] [blame] | 47 | IVT_TEXT |
Sam Ravnborg | 7664709 | 2007-05-13 00:31:33 +0200 | [diff] [blame] | 48 | TEXT_TEXT |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | SCHED_TEXT |
| 50 | LOCK_TEXT |
Prasanna S Panchamukhi | 1f7ad57 | 2005-09-06 15:19:30 -0700 | [diff] [blame] | 51 | KPROBES_TEXT |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 52 | *(.gnu.linkonce.t*) |
| 53 | } |
Tony Luck | 9d6f40b | 2007-07-20 14:39:24 -0700 | [diff] [blame] | 54 | .text.head : AT(ADDR(.text.head) - LOAD_OFFSET) |
| 55 | { *(.text.head) } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | .text2 : AT(ADDR(.text2) - LOAD_OFFSET) |
| 57 | { *(.text2) } |
| 58 | #ifdef CONFIG_SMP |
| 59 | .text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET) |
| 60 | { *(.text.lock) } |
| 61 | #endif |
| 62 | _etext = .; |
| 63 | |
| 64 | /* Read-only data */ |
| 65 | |
David Mosberger-Tang | 336cdba8 | 2007-08-09 11:53:15 -0600 | [diff] [blame^] | 66 | NOTES :code :note /* put .notes in text and mark in PT_NOTE */ |
| 67 | code_continues : {} :code /* switch back to regular program... */ |
| 68 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 69 | /* Exception table */ |
| 70 | . = ALIGN(16); |
| 71 | __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) |
| 72 | { |
| 73 | __start___ex_table = .; |
| 74 | *(__ex_table) |
| 75 | __stop___ex_table = .; |
| 76 | } |
| 77 | |
Russ Anderson | d89cfe7 | 2006-03-29 11:31:23 -0600 | [diff] [blame] | 78 | /* MCA table */ |
| 79 | . = ALIGN(16); |
| 80 | __mca_table : AT(ADDR(__mca_table) - LOAD_OFFSET) |
| 81 | { |
| 82 | __start___mca_table = .; |
| 83 | *(__mca_table) |
| 84 | __stop___mca_table = .; |
| 85 | } |
| 86 | |
Chen, Kenneth W | a0776ec | 2006-10-13 10:05:45 -0700 | [diff] [blame] | 87 | .data.patch.phys_stack_reg : AT(ADDR(.data.patch.phys_stack_reg) - LOAD_OFFSET) |
| 88 | { |
| 89 | __start___phys_stack_reg_patchlist = .; |
| 90 | *(.data.patch.phys_stack_reg) |
| 91 | __end___phys_stack_reg_patchlist = .; |
| 92 | } |
| 93 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 94 | /* Global data */ |
| 95 | _data = .; |
| 96 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 97 | /* Unwind info & table: */ |
| 98 | . = ALIGN(8); |
| 99 | .IA_64.unwind_info : AT(ADDR(.IA_64.unwind_info) - LOAD_OFFSET) |
| 100 | { *(.IA_64.unwind_info*) } |
| 101 | .IA_64.unwind : AT(ADDR(.IA_64.unwind) - LOAD_OFFSET) |
| 102 | { |
| 103 | __start_unwind = .; |
| 104 | *(.IA_64.unwind*) |
| 105 | __end_unwind = .; |
| 106 | } |
| 107 | |
| 108 | RODATA |
| 109 | |
| 110 | .opd : AT(ADDR(.opd) - LOAD_OFFSET) |
| 111 | { *(.opd) } |
| 112 | |
| 113 | /* Initialization code and data: */ |
| 114 | |
| 115 | . = ALIGN(PAGE_SIZE); |
| 116 | __init_begin = .; |
| 117 | .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) |
| 118 | { |
| 119 | _sinittext = .; |
| 120 | *(.init.text) |
| 121 | _einittext = .; |
| 122 | } |
| 123 | |
| 124 | .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) |
| 125 | { *(.init.data) } |
| 126 | |
Jean-Paul Saman | 67d3822 | 2007-02-10 01:44:44 -0800 | [diff] [blame] | 127 | #ifdef CONFIG_BLK_DEV_INITRD |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 128 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) |
| 129 | { |
| 130 | __initramfs_start = .; |
| 131 | *(.init.ramfs) |
| 132 | __initramfs_end = .; |
| 133 | } |
Jean-Paul Saman | 67d3822 | 2007-02-10 01:44:44 -0800 | [diff] [blame] | 134 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 135 | |
| 136 | . = ALIGN(16); |
| 137 | .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) |
| 138 | { |
| 139 | __setup_start = .; |
| 140 | *(.init.setup) |
| 141 | __setup_end = .; |
| 142 | } |
| 143 | .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) |
| 144 | { |
| 145 | __initcall_start = .; |
Andrew Morton | 61ce1ef | 2006-10-27 11:41:44 -0700 | [diff] [blame] | 146 | INITCALLS |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 147 | __initcall_end = .; |
| 148 | } |
Chen, Kenneth W | 39e18de | 2006-03-12 09:20:27 -0800 | [diff] [blame] | 149 | |
| 150 | .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET) |
| 151 | { |
| 152 | __start___vtop_patchlist = .; |
| 153 | *(.data.patch.vtop) |
| 154 | __end___vtop_patchlist = .; |
| 155 | } |
| 156 | |
| 157 | .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET) |
| 158 | { |
| 159 | __start___mckinley_e9_bundles = .; |
| 160 | *(.data.patch.mckinley_e9) |
| 161 | __end___mckinley_e9_bundles = .; |
| 162 | } |
| 163 | |
| 164 | #if defined(CONFIG_IA64_GENERIC) |
| 165 | /* Machine Vector */ |
| 166 | . = ALIGN(16); |
| 167 | .machvec : AT(ADDR(.machvec) - LOAD_OFFSET) |
| 168 | { |
| 169 | machvec_start = .; |
| 170 | *(.machvec) |
| 171 | machvec_end = .; |
| 172 | } |
| 173 | #endif |
| 174 | |
Kirill Korotaev | d00195e | 2007-02-05 16:19:59 -0800 | [diff] [blame] | 175 | . = ALIGN(8); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 176 | __con_initcall_start = .; |
| 177 | .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) |
| 178 | { *(.con_initcall.init) } |
| 179 | __con_initcall_end = .; |
| 180 | __security_initcall_start = .; |
| 181 | .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) |
| 182 | { *(.security_initcall.init) } |
| 183 | __security_initcall_end = .; |
| 184 | . = ALIGN(PAGE_SIZE); |
| 185 | __init_end = .; |
| 186 | |
| 187 | /* The initial task and kernel stack */ |
| 188 | .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) |
| 189 | { *(.data.init_task) } |
| 190 | |
| 191 | .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) |
| 192 | { *(__special_page_section) |
| 193 | __start_gate_section = .; |
| 194 | *(.data.gate) |
| 195 | __stop_gate_section = .; |
| 196 | } |
Al Stone | df8f0ec | 2006-08-12 11:08:12 -0600 | [diff] [blame] | 197 | . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose |
| 198 | * kernel data |
| 199 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 200 | |
Christoph Lameter | dc86e88 | 2005-12-12 09:34:32 -0800 | [diff] [blame] | 201 | .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) |
| 202 | { *(.data.read_mostly) } |
| 203 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 204 | .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) |
| 205 | { *(.data.cacheline_aligned) } |
| 206 | |
| 207 | /* Per-cpu data: */ |
| 208 | percpu : { } :percpu |
| 209 | . = ALIGN(PERCPU_PAGE_SIZE); |
| 210 | __phys_per_cpu_start = .; |
| 211 | .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET) |
| 212 | { |
| 213 | __per_cpu_start = .; |
| 214 | *(.data.percpu) |
Fenghua Yu | 5fb7dc3 | 2007-07-19 01:48:12 -0700 | [diff] [blame] | 215 | *(.data.percpu.shared_aligned) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 216 | __per_cpu_end = .; |
| 217 | } |
Al Stone | df8f0ec | 2006-08-12 11:08:12 -0600 | [diff] [blame] | 218 | . = __phys_per_cpu_start + PERCPU_PAGE_SIZE; /* ensure percpu data fits |
| 219 | * into percpu page size |
| 220 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 221 | |
| 222 | data : { } :data |
| 223 | .data : AT(ADDR(.data) - LOAD_OFFSET) |
Sam Ravnborg | ca96725 | 2007-05-17 13:38:44 +0200 | [diff] [blame] | 224 | { |
| 225 | DATA_DATA |
| 226 | *(.data1) |
| 227 | *(.gnu.linkonce.d*) |
| 228 | CONSTRUCTORS |
| 229 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 230 | |
| 231 | . = ALIGN(16); /* gp must be 16-byte aligned for exc. table */ |
| 232 | .got : AT(ADDR(.got) - LOAD_OFFSET) |
| 233 | { *(.got.plt) *(.got) } |
| 234 | __gp = ADDR(.got) + 0x200000; |
| 235 | /* We want the small data sections together, so single-instruction offsets |
| 236 | can access them all, and initialized data all before uninitialized, so |
| 237 | we can shorten the on-disk segment size. */ |
| 238 | .sdata : AT(ADDR(.sdata) - LOAD_OFFSET) |
| 239 | { *(.sdata) *(.sdata1) *(.srdata) } |
| 240 | _edata = .; |
| 241 | _bss = .; |
| 242 | .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) |
| 243 | { *(.sbss) *(.scommon) } |
| 244 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) |
| 245 | { *(.bss) *(COMMON) } |
| 246 | |
| 247 | _end = .; |
| 248 | |
| 249 | code : { } :code |
| 250 | /* Stabs debugging sections. */ |
| 251 | .stab 0 : { *(.stab) } |
| 252 | .stabstr 0 : { *(.stabstr) } |
| 253 | .stab.excl 0 : { *(.stab.excl) } |
| 254 | .stab.exclstr 0 : { *(.stab.exclstr) } |
| 255 | .stab.index 0 : { *(.stab.index) } |
| 256 | .stab.indexstr 0 : { *(.stab.indexstr) } |
| 257 | /* DWARF debug sections. |
| 258 | Symbols in the DWARF debugging sections are relative to the beginning |
| 259 | of the section so we begin them at 0. */ |
| 260 | /* DWARF 1 */ |
| 261 | .debug 0 : { *(.debug) } |
| 262 | .line 0 : { *(.line) } |
| 263 | /* GNU DWARF 1 extensions */ |
| 264 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
| 265 | .debug_sfnames 0 : { *(.debug_sfnames) } |
| 266 | /* DWARF 1.1 and DWARF 2 */ |
| 267 | .debug_aranges 0 : { *(.debug_aranges) } |
| 268 | .debug_pubnames 0 : { *(.debug_pubnames) } |
| 269 | /* DWARF 2 */ |
| 270 | .debug_info 0 : { *(.debug_info) } |
| 271 | .debug_abbrev 0 : { *(.debug_abbrev) } |
| 272 | .debug_line 0 : { *(.debug_line) } |
| 273 | .debug_frame 0 : { *(.debug_frame) } |
| 274 | .debug_str 0 : { *(.debug_str) } |
| 275 | .debug_loc 0 : { *(.debug_loc) } |
| 276 | .debug_macinfo 0 : { *(.debug_macinfo) } |
| 277 | /* SGI/MIPS DWARF 2 extensions */ |
| 278 | .debug_weaknames 0 : { *(.debug_weaknames) } |
| 279 | .debug_funcnames 0 : { *(.debug_funcnames) } |
| 280 | .debug_typenames 0 : { *(.debug_typenames) } |
| 281 | .debug_varnames 0 : { *(.debug_varnames) } |
| 282 | /* These must appear regardless of . */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 283 | /DISCARD/ : { *(.comment) } |
| 284 | /DISCARD/ : { *(.note) } |
| 285 | } |