1 /* Kernel link layout for various "sections"
3 * Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org>
4 * Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org>
5 * Copyright (C) 2000 John Marvin <jsm at parisc-linux.org>
6 * Copyright (C) 2000 Michael Ang <mang with subcarrier.org>
7 * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
8 * Copyright (C) 2003 James Bottomley <jejb with parisc-linux.org>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include <linux/config.h>
26 #include <asm-generic/vmlinux.lds.h>
27 /* needed for the processor specific cache alignment size */
28 #include <asm/cache.h>
31 /* ld script to make hppa Linux kernel */
32 #ifndef CONFIG_PARISC64
33 OUTPUT_FORMAT("elf32-hppa-linux")
36 OUTPUT_FORMAT("elf64-hppa-linux")
37 OUTPUT_ARCH(hppa:hppa2.0w)
41 #ifndef CONFIG_PARISC64
42 jiffies = jiffies_64 + 4;
49 . = KERNEL_BINARY_TEXT_START;
51 _text = .; /* Text and read-only data */
58 *(.text.do_sigaltstack)
62 *(.lock.text) /* out-of-line lock text */
66 _etext = .; /* End of text section */
71 . = ALIGN(4096); /* Make sure this is paged aligned so
72 that we can properly leave these
76 . = ALIGN(16); /* Exception table */
77 __start___ex_table = .;
78 __ex_table : { *(__ex_table) }
79 __stop___ex_table = .;
81 __start___unwind = .; /* unwind info */
82 .PARISC.unwind : { *(.PARISC.unwind) }
91 /* nosave data is really only used for software suspend...it's here
92 * just in case we ever implement it */
94 .data_nosave : { *(.data.nosave) }
98 . = ALIGN(L1_CACHE_BYTES);
99 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
101 /* PA-RISC locks requires 16-byte alignment */
103 .data.lock_aligned : { *(.data.lock_aligned) }
105 _edata = .; /* End of data section */
107 . = ALIGN(16384); /* init_task */
108 .data.init_task : { *(.data.init_task) }
110 /* The interrupt stack is currently partially coded, but not yet
113 init_istack : { *(init_istack) }
115 #ifdef CONFIG_PARISC64
116 . = ALIGN(16); /* Linkage tables */
117 .opd : { *(.opd) } PROVIDE (__gp = .);
129 .init.data : { *(.init.data) }
132 .init.setup : { *(.init.setup) }
134 __initcall_start = .;
145 __con_initcall_start = .;
146 .con_initcall.init : { *(.con_initcall.init) }
147 __con_initcall_end = .;
149 /* alternate instruction replacement. This is a mechanism x86 uses
150 * to detect the CPU type and replace generic instruction sequences
151 * with CPU specific ones. We don't currently do this in PA, but
152 * it seems like a good idea... */
154 __alt_instructions = .;
155 .altinstructions : { *(.altinstructions) }
156 __alt_instructions_end = .;
157 .altinstr_replacement : { *(.altinstr_replacement) }
158 /* .exit.text is discard at runtime, not link time, to deal with references
159 from .altinstructions and .eh_frame */
160 .exit.text : { *(.exit.text) }
161 .exit.data : { *(.exit.data) }
163 __initramfs_start = .;
164 .init.ramfs : { *(.init.ramfs) }
168 .data.percpu : { *(.data.percpu) }
172 /* freed after init ends here */
174 __bss_start = .; /* BSS */
175 .bss : { *(.bss) *(COMMON) }
180 /* Sections to be discarded */
183 #ifdef CONFIG_PARISC64
184 /* temporary hack until binutils is fixed to not emit these
185 for static binaries */
194 /* Stabs debugging sections. */
195 .stab 0 : { *(.stab) }
196 .stabstr 0 : { *(.stabstr) }
197 .stab.excl 0 : { *(.stab.excl) }
198 .stab.exclstr 0 : { *(.stab.exclstr) }
199 .stab.index 0 : { *(.stab.index) }
200 .stab.indexstr 0 : { *(.stab.indexstr) }
201 .comment 0 : { *(.comment) }
202 .note 0 : { *(.note) }