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