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