ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / parisc / kernel / vmlinux.lds.S
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>
9  *
10  *
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.
15  *
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.
20  *
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
24  */
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>
29         
30 /* ld script to make hppa Linux kernel */
31 #ifndef CONFIG_PARISC64
32 OUTPUT_FORMAT("elf32-hppa-linux")
33 OUTPUT_ARCH(hppa)
34 #else
35 OUTPUT_FORMAT("elf64-hppa-linux")
36 OUTPUT_ARCH(hppa:hppa2.0w)
37 #endif
38
39 ENTRY(_stext)
40 #ifndef CONFIG_PARISC64
41 jiffies = jiffies_64 + 4;
42 #else
43 jiffies = jiffies_64;
44 #endif
45 SECTIONS
46 {
47
48   . = 0x10100000;
49
50   _text = .;                    /* Text and read-only data */
51   .text ALIGN(16) : {
52         *(.text*)
53         SCHED_TEXT
54         *(.PARISC.unwind)
55         *(.fixup)
56         *(.lock.text)           /* out-of-line lock text */
57         *(.gnu.warning)
58         } = 0
59
60   _etext = .;                   /* End of text section */
61
62   RODATA
63
64   /* writeable */
65   . = ALIGN(4096);              /* Make sure this is paged aligned so
66                                    that we can properly leave these
67                                    as writable */
68   data_start = .;
69
70   . = ALIGN(16);                /* Exception table */
71   __start___ex_table = .;
72   __ex_table : { *(__ex_table) }
73   __stop___ex_table = .;
74
75   .data : {                     /* Data */
76         *(.data)
77         CONSTRUCTORS
78         }
79
80   . = ALIGN(4096);
81   /* nosave data is really only used for software suspend...it's here
82    * just in case we ever implement it */
83   __nosave_begin = .;
84   .data_nosave : { *(.data.nosave) }
85   . = ALIGN(4096);
86   __nosave_end = .;
87
88   . = ALIGN(L1_CACHE_BYTES);
89   .data.cacheline_aligned : { *(.data.cacheline_aligned) }
90
91   _edata = .;                   /* End of data section */
92
93   . = ALIGN(16384);             /* init_task */
94   .data.init_task : { *(.data.init_task) }
95
96   /* The interrupt stack is currently partially coded, but not yet
97    * implemented */
98   . = ALIGN(16384);     
99   init_istack : { *(init_istack) }
100
101 #ifdef CONFIG_PARISC64
102   . = ALIGN(16);               /* Linkage tables */
103   .opd : { *(.opd) } PROVIDE (__gp = .); 
104   .plt : { *(.plt) } 
105   .dlt : { *(.dlt) }
106 #endif
107
108   . = ALIGN(16384);
109   __init_begin = .;
110   .init.text : { 
111         _sinittext = .;
112         *(.init.text)
113         _einittext = .;
114   }
115   .init.data : { *(.init.data) }
116   . = ALIGN(16);
117   __setup_start = .;
118   .init.setup : { *(.init.setup) }
119   __setup_end = .;
120   __start___param = .;
121   __param : { *(__param) }
122   __stop___param = .;
123   __initcall_start = .;
124   .initcall.init : {
125         *(.initcall1.init) 
126         *(.initcall2.init) 
127         *(.initcall3.init) 
128         *(.initcall4.init) 
129         *(.initcall5.init) 
130         *(.initcall6.init) 
131         *(.initcall7.init)
132   }
133   __initcall_end = .;
134   __con_initcall_start = .;
135   .con_initcall.init : { *(.con_initcall.init) }
136   __con_initcall_end = .;
137   SECURITY_INIT
138   /* alternate instruction replacement.  This is a mechanism x86 uses
139    * to detect the CPU type and replace generic instruction sequences
140    * with CPU specific ones.  We don't currently do this in PA, but
141    * it seems like a good idea... */
142   . = ALIGN(4);
143   __alt_instructions = .;
144   .altinstructions : { *(.altinstructions) } 
145   __alt_instructions_end = .; 
146  .altinstr_replacement : { *(.altinstr_replacement) } 
147   /* .exit.text is discard at runtime, not link time, to deal with references
148      from .altinstructions and .eh_frame */
149   .exit.text : { *(.exit.text) }
150   .exit.data : { *(.exit.data) }
151   . = ALIGN(4096);
152   __initramfs_start = .;
153   .init.ramfs : { *(.init.ramfs) }
154   __initramfs_end = .;
155   . = ALIGN(32);
156   __per_cpu_start = .;
157   .data.percpu  : { *(.data.percpu) }
158   __per_cpu_end = .;
159   . = ALIGN(4096);
160   __init_end = .;
161   /* freed after init ends here */
162         
163   __bss_start = .;              /* BSS */
164   .bss : { *(.bss) *(COMMON) }
165   __bss_stop = .; 
166
167   _end = . ;
168
169   /* Sections to be discarded */
170   /DISCARD/ : {
171         *(.exitcall.exit)
172 #ifdef CONFIG_PARISC64
173         /* temporary hack until binutils is fixed to not emit these
174          for static binaries */
175         *(.interp)
176         *(.dynsym)
177         *(.dynstr)
178         *(.dynamic)
179         *(.hash)
180 #endif
181         }
182
183   /* Stabs debugging sections.  */
184   .stab 0 : { *(.stab) }
185   .stabstr 0 : { *(.stabstr) }
186   .stab.excl 0 : { *(.stab.excl) }
187   .stab.exclstr 0 : { *(.stab.exclstr) }
188   .stab.index 0 : { *(.stab.index) }
189   .stab.indexstr 0 : { *(.stab.indexstr) }
190   .comment 0 : { *(.comment) }
191   .note 0 : { *(.note) }        
192
193 }