Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux-2.6-block.git] / arch / parisc / kernel / vmlinux.lds.S
CommitLineData
1da177e4
LT
1/* Kernel link layout for various "sections"
2 *
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>
161bd3bf
HD
9 * Copyright (C) 2006-2013 Helge Deller <deller@gmx.de>
10 */
11
12/*
13 * Put page table entries (swapper_pg_dir) as the first thing in .bss. This
14 * will ensure that it has .bss alignment (PAGE_SIZE).
1da177e4 15 */
161bd3bf
HD
16#define BSS_FIRST_SECTIONS *(.data..vm0.pmd) \
17 *(.data..vm0.pgd) \
18 *(.data..vm0.pte)
19
1da177e4 20#include <asm-generic/vmlinux.lds.h>
161bd3bf 21
1da177e4
LT
22/* needed for the processor specific cache alignment size */
23#include <asm/cache.h>
24#include <asm/page.h>
2fd83038 25#include <asm/asm-offsets.h>
8cf06fc9 26#include <asm/thread_info.h>
1da177e4
LT
27
28/* ld script to make hppa Linux kernel */
29#ifndef CONFIG_64BIT
30OUTPUT_FORMAT("elf32-hppa-linux")
31OUTPUT_ARCH(hppa)
32#else
33OUTPUT_FORMAT("elf64-hppa-linux")
34OUTPUT_ARCH(hppa:hppa2.0w)
35#endif
36
161bd3bf 37ENTRY(parisc_kernel_start)
1da177e4
LT
38#ifndef CONFIG_64BIT
39jiffies = jiffies_64 + 4;
40#else
41jiffies = jiffies_64;
42#endif
43SECTIONS
44{
be1b3d8c 45 . = KERNEL_BINARY_TEXT_START;
1da177e4 46
161bd3bf
HD
47 __init_begin = .;
48 HEAD_TEXT_SECTION
49 INIT_TEXT_SECTION(8)
50
51 . = ALIGN(PAGE_SIZE);
52 INIT_DATA_SECTION(PAGE_SIZE)
53 /* we have to discard exit text and such at runtime, not link time */
54 .exit.text :
55 {
56 EXIT_TEXT
57 }
58 .exit.data :
59 {
60 EXIT_DATA
61 }
62 PERCPU_SECTION(8)
41b85a11 63 . = ALIGN(HUGEPAGE_SIZE);
161bd3bf
HD
64 __init_end = .;
65 /* freed after init ends here */
66
be1b3d8c 67 _text = .; /* Text and read-only data */
161bd3bf
HD
68 _stext = .;
69 .text ALIGN(PAGE_SIZE) : {
be1b3d8c
SR
70 TEXT_TEXT
71 SCHED_TEXT
6727ad9e 72 CPUIDLE_TEXT
be1b3d8c 73 LOCK_TEXT
d75f054a
HD
74 KPROBES_TEXT
75 IRQENTRY_TEXT
be7635e7 76 SOFTIRQENTRY_TEXT
be1b3d8c
SR
77 *(.text.do_softirq)
78 *(.text.sys_exit)
79 *(.text.do_sigaltstack)
80 *(.text.do_fork)
6cd819e8
HD
81 *(.text.div)
82 *($$*) /* millicode routines */
be1b3d8c
SR
83 *(.text.*)
84 *(.fixup)
85 *(.lock.text) /* out-of-line lock text */
86 *(.gnu.warning)
ed5fb247 87 }
161bd3bf 88 . = ALIGN(PAGE_SIZE);
be1b3d8c 89 _etext = .;
161bd3bf 90 /* End of text section */
1da177e4 91
a2d063ac
SR
92 /* Start of data section */
93 _sdata = .;
94
f8850abb
HD
95 /* Architecturally we need to keep __gp below 0x1000000 and thus
96 * in front of RO_DATA_SECTION() which stores lots of tracepoint
97 * and ftrace symbols. */
161bd3bf
HD
98#ifdef CONFIG_64BIT
99 . = ALIGN(16);
100 /* Linkage tables */
101 .opd : {
102 *(.opd)
103 } PROVIDE (__gp = .);
104 .plt : {
105 *(.plt)
106 }
107 .dlt : {
108 *(.dlt)
109 }
110#endif
81b4b98a 111
f8850abb
HD
112 RO_DATA_SECTION(8)
113
f79b076e
HD
114 /* RO because of BUILDTIME_EXTABLE_SORT */
115 EXCEPTION_TABLE(8)
116 NOTES
117
be1b3d8c
SR
118 /* unwind info */
119 .PARISC.unwind : {
120 __start___unwind = .;
121 *(.PARISC.unwind)
122 __stop___unwind = .;
123 }
2fd83038 124
161bd3bf
HD
125 /* writeable */
126 /* Make sure this is page aligned so
127 * that we can properly leave these
128 * as writable
129 */
41b85a11 130 . = ALIGN(HUGEPAGE_SIZE);
161bd3bf
HD
131 data_start = .;
132
be1b3d8c 133 /* Data */
9372450c 134 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, PAGE_SIZE)
1da177e4 135
be1b3d8c
SR
136 /* PA-RISC locks requires 16-byte alignment */
137 . = ALIGN(16);
a7df554e
DV
138 .data..lock_aligned : {
139 *(.data..lock_aligned)
be1b3d8c 140 }
1da177e4 141
be1b3d8c
SR
142 /* End of data section */
143 _edata = .;
1da177e4 144
be1b3d8c 145 /* BSS */
41b85a11
HD
146 BSS_SECTION(PAGE_SIZE, PAGE_SIZE, PAGE_SIZE)
147
41b85a11 148 . = ALIGN(HUGEPAGE_SIZE);
be1b3d8c 149 _end = . ;
5fb7dc37 150
023bf6f1
TH
151 STABS_DEBUG
152 .note 0 : { *(.note) }
153
be1b3d8c 154 /* Sections to be discarded */
023bf6f1 155 DISCARDS
be1b3d8c 156 /DISCARD/ : {
1da177e4 157#ifdef CONFIG_64BIT
be1b3d8c
SR
158 /* temporary hack until binutils is fixed to not emit these
159 * for static binaries
160 */
161 *(.interp)
162 *(.dynsym)
163 *(.dynstr)
164 *(.dynamic)
165 *(.hash)
166 *(.gnu.hash)
1da177e4
LT
167#endif
168 }
1da177e4 169}