ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / sh / kernel / vmlinux.lds.S
1 /* $Id: vmlinux.lds.S,v 1.8 2003/05/16 17:18:14 lethal Exp $
2  * ld script to make SuperH Linux kernel
3  * Written by Niibe Yutaka
4  */
5 #include <linux/config.h>
6 #include <asm-generic/vmlinux.lds.h>
7
8 #ifdef CONFIG_CPU_LITTLE_ENDIAN
9 OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
10 #else
11 OUTPUT_FORMAT("elf32-shbig-linux", "elf32-shbig-linux", "elf32-shbig-linux")
12 #endif
13 OUTPUT_ARCH(sh)
14 ENTRY(_start)
15 SECTIONS
16 {
17   . = 0x80000000 + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
18   _text = .;                    /* Text and read-only data */
19   text = .;                     /* Text and read-only data */
20   .empty_zero_page : {
21         *(.empty_zero_page)
22         } = 0
23   .text : {
24         *(.text)
25         SCHED_TEXT
26         *(.fixup)
27         *(.gnu.warning)
28         } = 0x0009
29
30   . = ALIGN(16);                /* Exception table */
31   __start___ex_table = .;
32   __ex_table : { *(__ex_table) }
33   __stop___ex_table = .;
34
35   RODATA
36
37   _etext = .;                   /* End of text section */
38
39   .data : {                     /* Data */
40         *(.data)
41         CONSTRUCTORS
42         }
43
44   . = ALIGN(4096);
45   .data.page_aligned : { *(.data.idt) }
46
47   . = ALIGN(32);
48   __per_cpu_start = .;
49   .data.percpu : { *(.data.percpu) }
50   __per_cpu_end = .;
51   .data.cacheline_aligned : { *(.data.cacheline_aligned) }
52
53   _edata = .;                   /* End of data section */
54
55   . = ALIGN(8192);              /* init_task */
56   .data.init_task : { *(.data.init_task) }
57   /* stack */
58   .stack : { stack = .;  _stack = .; }
59
60   . = ALIGN(4096);              /* Init code and data */
61   __init_begin = .;
62   _sinittext = .;
63   .init.text : { *(.init.text) }
64   _einittext = .;
65   .init.data : { *(.init.data) }
66   . = ALIGN(16);
67   __setup_start = .;
68   .init.setup : { *(.init.setup) }
69   __setup_end = .;
70   __start___param = .;
71   __param : { *(__param) }
72   __stop___param = .;
73   __initcall_start = .;
74   .initcall.init : {
75         *(.initcall1.init) 
76         *(.initcall2.init) 
77         *(.initcall3.init) 
78         *(.initcall4.init) 
79         *(.initcall5.init) 
80         *(.initcall6.init) 
81         *(.initcall7.init)
82   }
83   __initcall_end = .;
84   __con_initcall_start = .;
85   .con_initcall.init : { *(.con_initcall.init) }
86   __con_initcall_end = .;
87   SECURITY_INIT
88   __initramfs_start = .;
89   .init.ramfs : { *(.init.ramfs) }
90   __initramfs_end = .;
91   __machvec_start = .;
92   .init.machvec : { *(.init.machvec) }
93   __machvec_end = .;
94   . = ALIGN(4096);
95   __init_end = .;
96
97   . = ALIGN(4);
98   __bss_start = .;              /* BSS */
99   .bss : { *(.bss) }
100
101   . = ALIGN(4);
102   _end = . ;
103
104   /* When something in the kernel is NOT compiled as a module, the
105    * module cleanup code and data are put into these segments.  Both
106    * can then be thrown away, as cleanup code is never called unless
107    * it's a module.
108    */
109   /DISCARD/ : {
110         *(.exit.text)
111         *(.exit.data)
112         *(.exitcall.exit)
113         }
114
115   /* Stabs debugging sections.  */
116   .stab 0 : { *(.stab) }
117   .stabstr 0 : { *(.stabstr) }
118   .stab.excl 0 : { *(.stab.excl) }
119   .stab.exclstr 0 : { *(.stab.exclstr) }
120   .stab.index 0 : { *(.stab.index) }
121   .stab.indexstr 0 : { *(.stab.indexstr) }
122   .comment 0 : { *(.comment) }
123   /* DWARF debug sections.
124      Symbols in the DWARF debugging section are relative to the beginning
125      of the section so we begin .debug at 0.  */
126   /* DWARF 1 */
127   .debug          0 : { *(.debug) }
128   .line           0 : { *(.line) }
129   /* GNU DWARF 1 extensions */
130   .debug_srcinfo  0 : { *(.debug_srcinfo) }
131   .debug_sfnames  0 : { *(.debug_sfnames) }
132   /* DWARF 1.1 and DWARF 2 */
133   .debug_aranges  0 : { *(.debug_aranges) }
134   .debug_pubnames 0 : { *(.debug_pubnames) }
135   /* DWARF 2 */
136   .debug_info     0 : { *(.debug_info) }
137   .debug_abbrev   0 : { *(.debug_abbrev) }
138   .debug_line     0 : { *(.debug_line) }
139   .debug_frame    0 : { *(.debug_frame) }
140   .debug_str      0 : { *(.debug_str) }
141   .debug_loc      0 : { *(.debug_loc) }
142   .debug_macinfo  0 : { *(.debug_macinfo) }
143   /* SGI/MIPS DWARF 2 extensions */
144   .debug_weaknames 0 : { *(.debug_weaknames) }
145   .debug_funcnames 0 : { *(.debug_funcnames) }
146   .debug_typenames 0 : { *(.debug_typenames) }
147   .debug_varnames  0 : { *(.debug_varnames) }
148   /* These must appear regardless of  .  */
149 }