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>
9 * Copyright (C) 2006 Helge Deller <deller@gmx.de>
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #include <linux/config.h>
27 #include <asm-generic/vmlinux.lds.h>
28 /* needed for the processor specific cache alignment size */
29 #include <asm/cache.h>
31 #include <asm/asm-offsets.h>
33 /* ld script to make hppa Linux kernel */
35 OUTPUT_FORMAT("elf32-hppa-linux")
38 OUTPUT_FORMAT("elf64-hppa-linux")
39 OUTPUT_ARCH(hppa:hppa2.0w)
44 jiffies = jiffies_64 + 4;
51 . = KERNEL_BINARY_TEXT_START;
53 _text = .; /* Text and read-only data */
60 *(.text.do_sigaltstack)
64 *(.lock.text) /* out-of-line lock text */
68 _etext = .; /* End of text section */
73 . = ALIGN(ASM_PAGE_SIZE); /* Make sure this is page aligned so
74 that we can properly leave these
78 . = ALIGN(16); /* Exception table */
79 __start___ex_table = .;
80 __ex_table : { *(__ex_table) }
81 __stop___ex_table = .;
83 __start___unwind = .; /* unwind info */
84 .PARISC.unwind : { *(.PARISC.unwind) }
87 /* rarely changed data like cpu maps */
89 .data.read_mostly : { *(.data.read_mostly) }
91 . = ALIGN(L1_CACHE_BYTES);
97 . = ALIGN(L1_CACHE_BYTES);
98 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
100 /* PA-RISC locks requires 16-byte alignment */
102 .data.lock_aligned : { *(.data.lock_aligned) }
104 . = ALIGN(ASM_PAGE_SIZE);
105 /* nosave data is really only used for software suspend...it's here
106 * just in case we ever implement it */
108 .data_nosave : { *(.data.nosave) }
109 . = ALIGN(ASM_PAGE_SIZE);
112 _edata = .; /* End of data section */
114 __bss_start = .; /* BSS */
115 /* page table entries need to be PAGE_SIZE aligned */
116 . = ALIGN(ASM_PAGE_SIZE);
122 .bss : { *(.bss) *(COMMON) }
126 /* assembler code expects init_task to be 16k aligned */
127 . = ALIGN(16384); /* init_task */
128 .data.init_task : { *(.data.init_task) }
130 /* The interrupt stack is currently partially coded, but not yet
133 init_istack : { *(init_istack) }
136 . = ALIGN(16); /* Linkage tables */
137 .opd : { *(.opd) } PROVIDE (__gp = .);
142 /* reserve space for interrupt stack by aligning __init* to 16k */
150 .init.data : { *(.init.data) }
153 .init.setup : { *(.init.setup) }
155 __initcall_start = .;
166 __con_initcall_start = .;
167 .con_initcall.init : { *(.con_initcall.init) }
168 __con_initcall_end = .;
170 /* alternate instruction replacement. This is a mechanism x86 uses
171 * to detect the CPU type and replace generic instruction sequences
172 * with CPU specific ones. We don't currently do this in PA, but
173 * it seems like a good idea... */
175 __alt_instructions = .;
176 .altinstructions : { *(.altinstructions) }
177 __alt_instructions_end = .;
178 .altinstr_replacement : { *(.altinstr_replacement) }
179 /* .exit.text is discard at runtime, not link time, to deal with references
180 from .altinstructions and .eh_frame */
181 .exit.text : { *(.exit.text) }
182 .exit.data : { *(.exit.data) }
183 . = ALIGN(ASM_PAGE_SIZE);
184 __initramfs_start = .;
185 .init.ramfs : { *(.init.ramfs) }
189 .data.percpu : { *(.data.percpu) }
191 . = ALIGN(ASM_PAGE_SIZE);
193 /* freed after init ends here */
197 /* Sections to be discarded */
201 /* temporary hack until binutils is fixed to not emit these
202 for static binaries */
212 .note 0 : { *(.note) }