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