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