Commit | Line | Data |
---|---|---|
5f97f7f9 HS |
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> | |
7cf6ac2a HS |
12 | #include <asm/cache.h> |
13 | #include <asm/thread_info.h> | |
5f97f7f9 HS |
14 | |
15 | OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32") | |
16 | OUTPUT_ARCH(avr32) | |
17 | ENTRY(_start) | |
18 | ||
19 | /* Big endian */ | |
20 | jiffies = jiffies_64 + 4; | |
21 | ||
22 | SECTIONS | |
23 | { | |
24 | . = CONFIG_ENTRY_ADDRESS; | |
25 | .init : AT(ADDR(.init) - LOAD_OFFSET) { | |
26 | _stext = .; | |
27 | __init_begin = .; | |
28 | _sinittext = .; | |
29 | *(.text.reset) | |
01ba2bdc | 30 | INIT_TEXT |
623b0355 HS |
31 | /* |
32 | * .exit.text is discarded at runtime, not | |
33 | * link time, to deal with references from | |
34 | * __bug_table | |
35 | */ | |
01ba2bdc | 36 | EXIT_TEXT |
5f97f7f9 HS |
37 | _einittext = .; |
38 | . = ALIGN(4); | |
39 | __tagtable_begin = .; | |
b3cfe0cb | 40 | *(.taglist.init) |
5f97f7f9 | 41 | __tagtable_end = .; |
01ba2bdc | 42 | INIT_DATA |
5f97f7f9 HS |
43 | . = ALIGN(16); |
44 | __setup_start = .; | |
45 | *(.init.setup) | |
46 | __setup_end = .; | |
47 | . = ALIGN(4); | |
48 | __initcall_start = .; | |
61ce1efe | 49 | INITCALLS |
5f97f7f9 HS |
50 | __initcall_end = .; |
51 | __con_initcall_start = .; | |
52 | *(.con_initcall.init) | |
53 | __con_initcall_end = .; | |
54 | __security_initcall_start = .; | |
55 | *(.security_initcall.init) | |
56 | __security_initcall_end = .; | |
67d38229 | 57 | #ifdef CONFIG_BLK_DEV_INITRD |
5f97f7f9 HS |
58 | . = ALIGN(32); |
59 | __initramfs_start = .; | |
60 | *(.init.ramfs) | |
61 | __initramfs_end = .; | |
67d38229 | 62 | #endif |
7cf6ac2a | 63 | . = ALIGN(PAGE_SIZE); |
5f97f7f9 HS |
64 | __init_end = .; |
65 | } | |
66 | ||
5f97f7f9 HS |
67 | .text : AT(ADDR(.text) - LOAD_OFFSET) { |
68 | _evba = .; | |
69 | _text = .; | |
70 | *(.ex.text) | |
71 | . = 0x50; | |
72 | *(.tlbx.ex.text) | |
73 | . = 0x60; | |
74 | *(.tlbr.ex.text) | |
75 | . = 0x70; | |
76 | *(.tlbw.ex.text) | |
77 | . = 0x100; | |
78 | *(.scall.text) | |
79 | *(.irq.text) | |
2507bc13 | 80 | KPROBES_TEXT |
7664709b | 81 | TEXT_TEXT |
5f97f7f9 HS |
82 | SCHED_TEXT |
83 | LOCK_TEXT | |
5f97f7f9 HS |
84 | *(.fixup) |
85 | *(.gnu.warning) | |
86 | _etext = .; | |
87 | } = 0xd703d703 | |
88 | ||
89 | . = ALIGN(4); | |
90 | __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { | |
91 | __start___ex_table = .; | |
92 | *(__ex_table) | |
93 | __stop___ex_table = .; | |
94 | } | |
95 | ||
623b0355 HS |
96 | BUG_TABLE |
97 | ||
5f97f7f9 HS |
98 | RODATA |
99 | ||
7cf6ac2a | 100 | . = ALIGN(THREAD_SIZE); |
5f97f7f9 HS |
101 | |
102 | .data : AT(ADDR(.data) - LOAD_OFFSET) { | |
103 | _data = .; | |
104 | _sdata = .; | |
105 | /* | |
106 | * First, the init task union, aligned to an 8K boundary. | |
107 | */ | |
108 | *(.data.init_task) | |
109 | ||
110 | /* Then, the cacheline aligned data */ | |
7cf6ac2a | 111 | . = ALIGN(L1_CACHE_BYTES); |
5f97f7f9 HS |
112 | *(.data.cacheline_aligned) |
113 | ||
114 | /* And the rest... */ | |
115 | *(.data.rel*) | |
ca967258 | 116 | DATA_DATA |
5f97f7f9 HS |
117 | CONSTRUCTORS |
118 | ||
119 | _edata = .; | |
120 | } | |
121 | ||
122 | ||
123 | . = ALIGN(8); | |
124 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { | |
125 | __bss_start = .; | |
126 | *(.bss) | |
127 | *(COMMON) | |
128 | . = ALIGN(8); | |
129 | __bss_stop = .; | |
130 | _end = .; | |
131 | } | |
132 | ||
133 | /* When something in the kernel is NOT compiled as a module, the module | |
134 | * cleanup code and data are put into these segments. Both can then be | |
135 | * thrown away, as cleanup code is never called unless it's a module. | |
136 | */ | |
137 | /DISCARD/ : { | |
01ba2bdc | 138 | EXIT_DATA |
5f97f7f9 HS |
139 | *(.exitcall.exit) |
140 | } | |
141 | ||
142 | DWARF_DEBUG | |
143 | } |