Merge branch 'linux-2.6' into for-2.6.22
[sfrench/cifs-2.6.git] / arch / avr32 / kernel / vmlinux.lds.c
1 /*
2  * AVR32 linker script for the Linux kernel
3  *
4  * Copyright (C) 2004-2006 Atmel Corporation
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  */
10 #define LOAD_OFFSET 0x00000000
11 #include <asm-generic/vmlinux.lds.h>
12
13 OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
14 OUTPUT_ARCH(avr32)
15 ENTRY(_start)
16
17 /* Big endian */
18 jiffies = jiffies_64 + 4;
19
20 SECTIONS
21 {
22         . = CONFIG_ENTRY_ADDRESS;
23         .init           : AT(ADDR(.init) - LOAD_OFFSET) {
24                 _stext = .;
25                 __init_begin = .;
26                         _sinittext = .;
27                         *(.text.reset)
28                         *(.init.text)
29                         /*
30                          * .exit.text is discarded at runtime, not
31                          * link time, to deal with references from
32                          * __bug_table
33                          */
34                         *(.exit.text)
35                         _einittext = .;
36                 . = ALIGN(4);
37                 __tagtable_begin = .;
38                         *(.taglist)
39                 __tagtable_end = .;
40                         *(.init.data)
41                 . = ALIGN(16);
42                 __setup_start = .;
43                         *(.init.setup)
44                 __setup_end = .;
45                 . = ALIGN(4);
46                 __initcall_start = .;
47                         INITCALLS
48                 __initcall_end = .;
49                 __con_initcall_start = .;
50                         *(.con_initcall.init)
51                 __con_initcall_end = .;
52                 __security_initcall_start = .;
53                         *(.security_initcall.init)
54                 __security_initcall_end = .;
55 #ifdef CONFIG_BLK_DEV_INITRD
56                 . = ALIGN(32);
57                 __initramfs_start = .;
58                         *(.init.ramfs)
59                 __initramfs_end = .;
60 #endif
61                 . = ALIGN(4096);
62                 __init_end = .;
63         }
64
65         . = ALIGN(8192);
66         .text           : AT(ADDR(.text) - LOAD_OFFSET) {
67                 _evba = .;
68                 _text = .;
69                 *(.ex.text)
70                 . = 0x50;
71                 *(.tlbx.ex.text)
72                 . = 0x60;
73                 *(.tlbr.ex.text)
74                 . = 0x70;
75                 *(.tlbw.ex.text)
76                 . = 0x100;
77                 *(.scall.text)
78                 *(.irq.text)
79                 *(.text)
80                 SCHED_TEXT
81                 LOCK_TEXT
82                 KPROBES_TEXT
83                 *(.fixup)
84                 *(.gnu.warning)
85                 _etext = .;
86         } = 0xd703d703
87
88         . = ALIGN(4);
89         __ex_table      : AT(ADDR(__ex_table) - LOAD_OFFSET) {
90                 __start___ex_table = .;
91                 *(__ex_table)
92                 __stop___ex_table = .;
93         }
94
95         BUG_TABLE
96
97         RODATA
98
99         . = ALIGN(8192);
100
101         .data           : AT(ADDR(.data) - LOAD_OFFSET) {
102                 _data = .;
103                 _sdata = .;
104                 /*
105                  * First, the init task union, aligned to an 8K boundary.
106                  */
107                 *(.data.init_task)
108
109                 /* Then, the cacheline aligned data */
110                 . = ALIGN(32);
111                 *(.data.cacheline_aligned)
112
113                 /* And the rest... */
114                 *(.data.rel*)
115                 *(.data)
116                 CONSTRUCTORS
117
118                 _edata = .;
119         }
120
121
122         . = ALIGN(8);
123         .bss            : AT(ADDR(.bss) - LOAD_OFFSET) {
124                 __bss_start = .;
125                 *(.bss)
126                 *(COMMON)
127                 . = ALIGN(8);
128                 __bss_stop = .;
129                 _end = .;
130         }
131
132         /* When something in the kernel is NOT compiled as a module, the module
133          * cleanup code and data are put into these segments. Both can then be
134          * thrown away, as cleanup code is never called unless it's a module.
135          */
136         /DISCARD/               : {
137                 *(.exit.data)
138                 *(.exitcall.exit)
139         }
140
141         DWARF_DEBUG
142 }