vmlinux.lds.S 3.7 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3 4 5 6 7 8
/*    Kernel link layout for various "sections"
 *
 *    Copyright (C) 1999-2003 Matthew Wilcox <willy at parisc-linux.org>
 *    Copyright (C) 2000-2003 Paul Bame <bame at parisc-linux.org>
 *    Copyright (C) 2000 John Marvin <jsm at parisc-linux.org>
 *    Copyright (C) 2000 Michael Ang <mang with subcarrier.org>
 *    Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
 *    Copyright (C) 2003 James Bottomley <jejb with parisc-linux.org>
9
 *    Copyright (C) 2006 Helge Deller <deller@gmx.de>
L
Linus Torvalds 已提交
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
 *
 *
 *    This program is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation; either version 2 of the License, or
 *    (at your option) any later version.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with this program; if not, write to the Free Software
 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
#include <asm-generic/vmlinux.lds.h>
/* needed for the processor specific cache alignment size */	
#include <asm/cache.h>
#include <asm/page.h>
30
#include <asm/asm-offsets.h>
31
#include <asm/thread_info.h>
L
Linus Torvalds 已提交
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
	
/* ld script to make hppa Linux kernel */
#ifndef CONFIG_64BIT
OUTPUT_FORMAT("elf32-hppa-linux")
OUTPUT_ARCH(hppa)
#else
OUTPUT_FORMAT("elf64-hppa-linux")
OUTPUT_ARCH(hppa:hppa2.0w)
#endif

ENTRY(_stext)
#ifndef CONFIG_64BIT
jiffies = jiffies_64 + 4;
#else
jiffies = jiffies_64;
#endif
SECTIONS
{
50
	. = KERNEL_BINARY_TEXT_START;
L
Linus Torvalds 已提交
51

52 53
	_text = .;		/* Text and read-only data */
	.text ALIGN(16) : {
54
		HEAD_TEXT
55 56 57
		TEXT_TEXT
		SCHED_TEXT
		LOCK_TEXT
58 59
		KPROBES_TEXT
		IRQENTRY_TEXT
60 61 62 63 64 65 66 67
		*(.text.do_softirq)
		*(.text.sys_exit)
		*(.text.do_sigaltstack)
		*(.text.do_fork)
		*(.text.*)
		*(.fixup)
		*(.lock.text)		/* out-of-line lock text */
		*(.gnu.warning)
L
Linus Torvalds 已提交
68
	} = 0
69 70
	/* End of text section */
	_etext = .;
L
Linus Torvalds 已提交
71

72
	RODATA
L
Linus Torvalds 已提交
73

74 75 76 77 78
	/* writeable */
	/* Make sure this is page aligned so
	 * that we can properly leave these
	 * as writable
	 */
S
Sam Ravnborg 已提交
79
	. = ALIGN(PAGE_SIZE);
80
	data_start = .;
81
	EXCEPTION_TABLE(16)
L
Linus Torvalds 已提交
82

83
	NOTES
K
Kyle McMartin 已提交
84

85 86 87 88 89 90
	/* unwind info */
	.PARISC.unwind : {
		__start___unwind = .;
		*(.PARISC.unwind)
		__stop___unwind = .;
	}
91

92
	/* Data */
93
	RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
L
Linus Torvalds 已提交
94

95 96 97 98 99
	/* PA-RISC locks requires 16-byte alignment */
	. = ALIGN(16);
	.data.lock_aligned : {
		*(.data.lock_aligned)
	}
L
Linus Torvalds 已提交
100

101 102
	/* End of data section */
	_edata = .;
L
Linus Torvalds 已提交
103

104 105 106
	/* BSS */
	__bss_start = .;
	/* page table entries need to be PAGE_SIZE aligned */
S
Sam Ravnborg 已提交
107
	. = ALIGN(PAGE_SIZE);
108 109 110 111 112 113 114 115
	.data.vmpages : {
		*(.data.vm0.pmd)
		*(.data.vm0.pgd)
		*(.data.vm0.pte)
	}
	.bss : {
		*(.bss)
		*(COMMON)
116
	}
117
	__bss_stop = .;
118

L
Linus Torvalds 已提交
119
#ifdef CONFIG_64BIT
120 121 122 123 124 125 126 127 128 129 130
	. = ALIGN(16);
	/* Linkage tables */
	.opd : {
		*(.opd)
	} PROVIDE (__gp = .); 
	.plt : {
		*(.plt)
	} 
	.dlt : {
		*(.dlt)
	}
L
Linus Torvalds 已提交
131 132
#endif

133 134 135
	/* reserve space for interrupt stack by aligning __init* to 16k */
	. = ALIGN(16384);
	__init_begin = .;
136 137
	INIT_TEXT_SECTION(16384)
	INIT_DATA_SECTION(16)
138 139 140 141 142 143 144 145 146
	/* we have to discard exit text and such at runtime, not link time */
	.exit.text :
	{
		EXIT_TEXT
	}
	.exit.data :
	{
		EXIT_DATA
	}
147

S
Sam Ravnborg 已提交
148 149
	PERCPU(PAGE_SIZE)
	. = ALIGN(PAGE_SIZE);
150 151 152
	__init_end = .;
	/* freed after init ends here */
	_end = . ;
153

154 155 156
	STABS_DEBUG
	.note 0 : { *(.note) }

157
	/* Sections to be discarded */
158
	DISCARDS
159
	/DISCARD/ : {
L
Linus Torvalds 已提交
160
#ifdef CONFIG_64BIT
161 162 163 164 165 166 167 168 169
		/* temporary hack until binutils is fixed to not emit these
	 	 * for static binaries
		 */
		*(.interp)
		*(.dynsym)
		*(.dynstr)
		*(.dynamic)
		*(.hash)
		*(.gnu.hash)
L
Linus Torvalds 已提交
170 171 172
#endif
	}
}