blob: ef13b7c78935dba91cce904c289f3259f689db75 [file] [log] [blame]
Haavard Skinnemoen5f97f7f2006-09-25 23:32:13 -07001/*
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
13OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32")
14OUTPUT_ARCH(avr32)
15ENTRY(_start)
16
17/* Big endian */
18jiffies = jiffies_64 + 4;
19
20SECTIONS
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 _einittext = .;
30 . = ALIGN(4);
31 __tagtable_begin = .;
32 *(.taglist)
33 __tagtable_end = .;
34 *(.init.data)
35 . = ALIGN(16);
36 __setup_start = .;
37 *(.init.setup)
38 __setup_end = .;
39 . = ALIGN(4);
40 __initcall_start = .;
Andrew Morton61ce1ef2006-10-27 11:41:44 -070041 INITCALLS
Haavard Skinnemoen5f97f7f2006-09-25 23:32:13 -070042 __initcall_end = .;
43 __con_initcall_start = .;
44 *(.con_initcall.init)
45 __con_initcall_end = .;
46 __security_initcall_start = .;
47 *(.security_initcall.init)
48 __security_initcall_end = .;
Jean-Paul Saman67d38222007-02-10 01:44:44 -080049#ifdef CONFIG_BLK_DEV_INITRD
Haavard Skinnemoen5f97f7f2006-09-25 23:32:13 -070050 . = ALIGN(32);
51 __initramfs_start = .;
52 *(.init.ramfs)
53 __initramfs_end = .;
Jean-Paul Saman67d38222007-02-10 01:44:44 -080054#endif
Haavard Skinnemoen5f97f7f2006-09-25 23:32:13 -070055 . = ALIGN(4096);
56 __init_end = .;
57 }
58
59 . = ALIGN(8192);
60 .text : AT(ADDR(.text) - LOAD_OFFSET) {
61 _evba = .;
62 _text = .;
63 *(.ex.text)
64 . = 0x50;
65 *(.tlbx.ex.text)
66 . = 0x60;
67 *(.tlbr.ex.text)
68 . = 0x70;
69 *(.tlbw.ex.text)
70 . = 0x100;
71 *(.scall.text)
72 *(.irq.text)
73 *(.text)
74 SCHED_TEXT
75 LOCK_TEXT
76 KPROBES_TEXT
77 *(.fixup)
78 *(.gnu.warning)
79 _etext = .;
80 } = 0xd703d703
81
82 . = ALIGN(4);
83 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
84 __start___ex_table = .;
85 *(__ex_table)
86 __stop___ex_table = .;
87 }
88
89 RODATA
90
91 . = ALIGN(8192);
92
93 .data : AT(ADDR(.data) - LOAD_OFFSET) {
94 _data = .;
95 _sdata = .;
96 /*
97 * First, the init task union, aligned to an 8K boundary.
98 */
99 *(.data.init_task)
100
101 /* Then, the cacheline aligned data */
102 . = ALIGN(32);
103 *(.data.cacheline_aligned)
104
105 /* And the rest... */
106 *(.data.rel*)
107 *(.data)
108 CONSTRUCTORS
109
110 _edata = .;
111 }
112
113
114 . = ALIGN(8);
115 .bss : AT(ADDR(.bss) - LOAD_OFFSET) {
116 __bss_start = .;
117 *(.bss)
118 *(COMMON)
119 . = ALIGN(8);
120 __bss_stop = .;
121 _end = .;
122 }
123
124 /* When something in the kernel is NOT compiled as a module, the module
125 * cleanup code and data are put into these segments. Both can then be
126 * thrown away, as cleanup code is never called unless it's a module.
127 */
128 /DISCARD/ : {
129 *(.exit.text)
130 *(.exit.data)
131 *(.exitcall.exit)
132 }
133
134 DWARF_DEBUG
135}