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 <asm-generic/vmlinux.lds.h>
27 /* needed for the processor specific cache alignment size */
28 #include <asm/cache.h>
30 #include <asm/asm-offsets.h>
31 #include <asm/thread_info.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;
50 . = KERNEL_BINARY_TEXT_START;
52 _text = .; /* Text and read-only data */
62 *(.text.do_sigaltstack)
66 *(.lock.text) /* out-of-line lock text */
69 /* End of text section */
72 /* Start of data section */
78 /* Make sure this is page aligned so
79 * that we can properly leave these
96 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
98 /* PA-RISC locks requires 16-byte alignment */
100 .data..lock_aligned : {
101 *(.data..lock_aligned)
104 /* End of data section */
109 /* page table entries need to be PAGE_SIZE aligned */
110 . = ALIGN(PAGE_SIZE);
127 } PROVIDE (__gp = .);
136 /* reserve space for interrupt stack by aligning __init* to 16k */
139 INIT_TEXT_SECTION(16384)
140 . = ALIGN(PAGE_SIZE);
141 INIT_DATA_SECTION(16)
142 /* we have to discard exit text and such at runtime, not link time */
152 PERCPU_SECTION(L1_CACHE_BYTES)
153 . = ALIGN(PAGE_SIZE);
155 /* freed after init ends here */
159 .note 0 : { *(.note) }
161 /* Sections to be discarded */
165 /* temporary hack until binutils is fixed to not emit these
166 * for static binaries