| 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 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | #include <asm-generic/vmlinux.lds.h> | 
|  | 8 |  | 
| Keshavamurthy Anil S | c7b645f | 2005-06-27 15:17:16 -0700 | [diff] [blame] | 9 | #define IVT_TEXT							\ | 
|  | 10 | VMLINUX_SYMBOL(__start_ivt_text) = .;			\ | 
|  | 11 | *(.text.ivt)						\ | 
|  | 12 | VMLINUX_SYMBOL(__end_ivt_text) = .; | 
|  | 13 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | OUTPUT_FORMAT("elf64-ia64-little") | 
|  | 15 | OUTPUT_ARCH(ia64) | 
|  | 16 | ENTRY(phys_start) | 
|  | 17 | jiffies = jiffies_64; | 
|  | 18 | PHDRS { | 
|  | 19 | code   PT_LOAD; | 
|  | 20 | percpu PT_LOAD; | 
|  | 21 | data   PT_LOAD; | 
| David Mosberger-Tang | 336cdba8 | 2007-08-09 11:53:15 -0600 | [diff] [blame] | 22 | note   PT_NOTE; | 
| David Mosberger-Tang | 9bf77d0 | 2007-08-09 19:58:52 -0600 | [diff] [blame] | 23 | unwind 0x70000001; /* PT_IA_64_UNWIND, but ld doesn't match the name */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | } | 
|  | 25 | SECTIONS | 
|  | 26 | { | 
|  | 27 | /* Sections to be discarded */ | 
|  | 28 | /DISCARD/ : { | 
| Sam Ravnborg | 01ba2bd | 2008-01-20 14:15:03 +0100 | [diff] [blame] | 29 | EXIT_TEXT | 
|  | 30 | EXIT_DATA | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 = .; | 
| David Mosberger-Tang | 9bf77d0 | 2007-08-09 19:58:52 -0600 | [diff] [blame] | 106 | } :code :unwind | 
|  | 107 | code_continues2 : {} : code | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 108 |  | 
|  | 109 | RODATA | 
|  | 110 |  | 
|  | 111 | .opd : AT(ADDR(.opd) - LOAD_OFFSET) | 
|  | 112 | { *(.opd) } | 
|  | 113 |  | 
|  | 114 | /* Initialization code and data: */ | 
|  | 115 |  | 
|  | 116 | . = ALIGN(PAGE_SIZE); | 
|  | 117 | __init_begin = .; | 
|  | 118 | .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) | 
|  | 119 | { | 
|  | 120 | _sinittext = .; | 
| Sam Ravnborg | 01ba2bd | 2008-01-20 14:15:03 +0100 | [diff] [blame] | 121 | INIT_TEXT | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 122 | _einittext = .; | 
|  | 123 | } | 
|  | 124 |  | 
|  | 125 | .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) | 
| Sam Ravnborg | 01ba2bd | 2008-01-20 14:15:03 +0100 | [diff] [blame] | 126 | { INIT_DATA } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 127 |  | 
| Jean-Paul Saman | 67d3822 | 2007-02-10 01:44:44 -0800 | [diff] [blame] | 128 | #ifdef CONFIG_BLK_DEV_INITRD | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 129 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) | 
|  | 130 | { | 
|  | 131 | __initramfs_start = .; | 
|  | 132 | *(.init.ramfs) | 
|  | 133 | __initramfs_end = .; | 
|  | 134 | } | 
| Jean-Paul Saman | 67d3822 | 2007-02-10 01:44:44 -0800 | [diff] [blame] | 135 | #endif | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 136 |  | 
|  | 137 | . = ALIGN(16); | 
|  | 138 | .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) | 
|  | 139 | { | 
|  | 140 | __setup_start = .; | 
|  | 141 | *(.init.setup) | 
|  | 142 | __setup_end = .; | 
|  | 143 | } | 
|  | 144 | .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) | 
|  | 145 | { | 
|  | 146 | __initcall_start = .; | 
| Andrew Morton | 61ce1ef | 2006-10-27 11:41:44 -0700 | [diff] [blame] | 147 | INITCALLS | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 148 | __initcall_end = .; | 
|  | 149 | } | 
| Chen, Kenneth W | 39e18de | 2006-03-12 09:20:27 -0800 | [diff] [blame] | 150 |  | 
|  | 151 | .data.patch.vtop : AT(ADDR(.data.patch.vtop) - LOAD_OFFSET) | 
|  | 152 | { | 
|  | 153 | __start___vtop_patchlist = .; | 
|  | 154 | *(.data.patch.vtop) | 
|  | 155 | __end___vtop_patchlist = .; | 
|  | 156 | } | 
|  | 157 |  | 
| Tony Luck | 4dcc29e | 2008-05-27 13:23:16 -0700 | [diff] [blame] | 158 | .data.patch.rse : AT(ADDR(.data.patch.rse) - LOAD_OFFSET) | 
|  | 159 | { | 
|  | 160 | __start___rse_patchlist = .; | 
|  | 161 | *(.data.patch.rse) | 
|  | 162 | __end___rse_patchlist = .; | 
|  | 163 | } | 
|  | 164 |  | 
| Chen, Kenneth W | 39e18de | 2006-03-12 09:20:27 -0800 | [diff] [blame] | 165 | .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET) | 
|  | 166 | { | 
|  | 167 | __start___mckinley_e9_bundles = .; | 
|  | 168 | *(.data.patch.mckinley_e9) | 
|  | 169 | __end___mckinley_e9_bundles = .; | 
|  | 170 | } | 
|  | 171 |  | 
|  | 172 | #if defined(CONFIG_IA64_GENERIC) | 
|  | 173 | /* Machine Vector */ | 
|  | 174 | . = ALIGN(16); | 
|  | 175 | .machvec : AT(ADDR(.machvec) - LOAD_OFFSET) | 
|  | 176 | { | 
|  | 177 | machvec_start = .; | 
|  | 178 | *(.machvec) | 
|  | 179 | machvec_end = .; | 
|  | 180 | } | 
|  | 181 | #endif | 
|  | 182 |  | 
| Kirill Korotaev | d00195e | 2007-02-05 16:19:59 -0800 | [diff] [blame] | 183 | . = ALIGN(8); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 184 | __con_initcall_start = .; | 
|  | 185 | .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) | 
|  | 186 | { *(.con_initcall.init) } | 
|  | 187 | __con_initcall_end = .; | 
|  | 188 | __security_initcall_start = .; | 
|  | 189 | .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) | 
|  | 190 | { *(.security_initcall.init) } | 
|  | 191 | __security_initcall_end = .; | 
|  | 192 | . = ALIGN(PAGE_SIZE); | 
|  | 193 | __init_end = .; | 
|  | 194 |  | 
|  | 195 | /* The initial task and kernel stack */ | 
|  | 196 | .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) | 
|  | 197 | { *(.data.init_task) } | 
|  | 198 |  | 
|  | 199 | .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) | 
|  | 200 | { *(__special_page_section) | 
|  | 201 | __start_gate_section = .; | 
|  | 202 | *(.data.gate) | 
|  | 203 | __stop_gate_section = .; | 
|  | 204 | } | 
| Al Stone | df8f0ec | 2006-08-12 11:08:12 -0600 | [diff] [blame] | 205 | . = ALIGN(PAGE_SIZE);		/* make sure the gate page doesn't expose | 
|  | 206 | * kernel data | 
|  | 207 | */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 208 |  | 
| Christoph Lameter | dc86e88 | 2005-12-12 09:34:32 -0800 | [diff] [blame] | 209 | .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) | 
|  | 210 | { *(.data.read_mostly) } | 
|  | 211 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 212 | .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) | 
|  | 213 | { *(.data.cacheline_aligned) } | 
|  | 214 |  | 
|  | 215 | /* Per-cpu data: */ | 
|  | 216 | percpu : { } :percpu | 
|  | 217 | . = ALIGN(PERCPU_PAGE_SIZE); | 
|  | 218 | __phys_per_cpu_start = .; | 
|  | 219 | .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET) | 
|  | 220 | { | 
|  | 221 | __per_cpu_start = .; | 
|  | 222 | *(.data.percpu) | 
| Fenghua Yu | 5fb7dc3 | 2007-07-19 01:48:12 -0700 | [diff] [blame] | 223 | *(.data.percpu.shared_aligned) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 224 | __per_cpu_end = .; | 
|  | 225 | } | 
| Al Stone | df8f0ec | 2006-08-12 11:08:12 -0600 | [diff] [blame] | 226 | . = __phys_per_cpu_start + PERCPU_PAGE_SIZE;	/* ensure percpu data fits | 
|  | 227 | * into percpu page size | 
|  | 228 | */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 229 |  | 
|  | 230 | data : { } :data | 
|  | 231 | .data : AT(ADDR(.data) - LOAD_OFFSET) | 
| Sam Ravnborg | ca96725 | 2007-05-17 13:38:44 +0200 | [diff] [blame] | 232 | { | 
| Tony Luck | c459ce8 | 2008-09-29 16:39:19 -0700 | [diff] [blame] | 233 | #ifdef	CONFIG_SMP | 
|  | 234 | . = ALIGN(PERCPU_PAGE_SIZE); | 
|  | 235 | __cpu0_per_cpu = .; | 
|  | 236 | . = . + PERCPU_PAGE_SIZE;	/* cpu0 per-cpu space */ | 
|  | 237 | #endif | 
| Sam Ravnborg | ca96725 | 2007-05-17 13:38:44 +0200 | [diff] [blame] | 238 | DATA_DATA | 
|  | 239 | *(.data1) | 
|  | 240 | *(.gnu.linkonce.d*) | 
|  | 241 | CONSTRUCTORS | 
|  | 242 | } | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 243 |  | 
|  | 244 | . = ALIGN(16);	/* gp must be 16-byte aligned for exc. table */ | 
|  | 245 | .got : AT(ADDR(.got) - LOAD_OFFSET) | 
|  | 246 | { *(.got.plt) *(.got) } | 
|  | 247 | __gp = ADDR(.got) + 0x200000; | 
|  | 248 | /* We want the small data sections together, so single-instruction offsets | 
|  | 249 | can access them all, and initialized data all before uninitialized, so | 
|  | 250 | we can shorten the on-disk segment size.  */ | 
|  | 251 | .sdata : AT(ADDR(.sdata) - LOAD_OFFSET) | 
|  | 252 | { *(.sdata) *(.sdata1) *(.srdata) } | 
|  | 253 | _edata  =  .; | 
| Bernhard Walle | b898a42 | 2007-11-21 14:58:25 -0800 | [diff] [blame] | 254 | __bss_start = .; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 255 | .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) | 
|  | 256 | { *(.sbss) *(.scommon) } | 
|  | 257 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) | 
|  | 258 | { *(.bss) *(COMMON) } | 
| Bernhard Walle | b898a42 | 2007-11-21 14:58:25 -0800 | [diff] [blame] | 259 | __bss_stop = .; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 260 |  | 
|  | 261 | _end = .; | 
|  | 262 |  | 
|  | 263 | code : { } :code | 
|  | 264 | /* Stabs debugging sections.  */ | 
|  | 265 | .stab 0 : { *(.stab) } | 
|  | 266 | .stabstr 0 : { *(.stabstr) } | 
|  | 267 | .stab.excl 0 : { *(.stab.excl) } | 
|  | 268 | .stab.exclstr 0 : { *(.stab.exclstr) } | 
|  | 269 | .stab.index 0 : { *(.stab.index) } | 
|  | 270 | .stab.indexstr 0 : { *(.stab.indexstr) } | 
|  | 271 | /* DWARF debug sections. | 
|  | 272 | Symbols in the DWARF debugging sections are relative to the beginning | 
|  | 273 | of the section so we begin them at 0.  */ | 
|  | 274 | /* DWARF 1 */ | 
|  | 275 | .debug          0 : { *(.debug) } | 
|  | 276 | .line           0 : { *(.line) } | 
|  | 277 | /* GNU DWARF 1 extensions */ | 
|  | 278 | .debug_srcinfo  0 : { *(.debug_srcinfo) } | 
|  | 279 | .debug_sfnames  0 : { *(.debug_sfnames) } | 
|  | 280 | /* DWARF 1.1 and DWARF 2 */ | 
|  | 281 | .debug_aranges  0 : { *(.debug_aranges) } | 
|  | 282 | .debug_pubnames 0 : { *(.debug_pubnames) } | 
|  | 283 | /* DWARF 2 */ | 
|  | 284 | .debug_info     0 : { *(.debug_info) } | 
|  | 285 | .debug_abbrev   0 : { *(.debug_abbrev) } | 
|  | 286 | .debug_line     0 : { *(.debug_line) } | 
|  | 287 | .debug_frame    0 : { *(.debug_frame) } | 
|  | 288 | .debug_str      0 : { *(.debug_str) } | 
|  | 289 | .debug_loc      0 : { *(.debug_loc) } | 
|  | 290 | .debug_macinfo  0 : { *(.debug_macinfo) } | 
|  | 291 | /* SGI/MIPS DWARF 2 extensions */ | 
|  | 292 | .debug_weaknames 0 : { *(.debug_weaknames) } | 
|  | 293 | .debug_funcnames 0 : { *(.debug_funcnames) } | 
|  | 294 | .debug_typenames 0 : { *(.debug_typenames) } | 
|  | 295 | .debug_varnames  0 : { *(.debug_varnames) } | 
|  | 296 | /* These must appear regardless of  .  */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 297 | /DISCARD/ : { *(.comment) } | 
|  | 298 | /DISCARD/ : { *(.note) } | 
|  | 299 | } |