Haavard Skinnemoen | 5f97f7f | 2006-09-25 23:32:13 -0700 | [diff] [blame] | 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 | _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 Morton | 61ce1ef | 2006-10-27 11:41:44 -0700 | [diff] [blame] | 41 | INITCALLS |
Haavard Skinnemoen | 5f97f7f | 2006-09-25 23:32:13 -0700 | [diff] [blame] | 42 | __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 = .; |
| 49 | . = ALIGN(32); |
| 50 | __initramfs_start = .; |
| 51 | *(.init.ramfs) |
| 52 | __initramfs_end = .; |
| 53 | . = ALIGN(4096); |
| 54 | __init_end = .; |
| 55 | } |
| 56 | |
| 57 | . = ALIGN(8192); |
| 58 | .text : AT(ADDR(.text) - LOAD_OFFSET) { |
| 59 | _evba = .; |
| 60 | _text = .; |
| 61 | *(.ex.text) |
| 62 | . = 0x50; |
| 63 | *(.tlbx.ex.text) |
| 64 | . = 0x60; |
| 65 | *(.tlbr.ex.text) |
| 66 | . = 0x70; |
| 67 | *(.tlbw.ex.text) |
| 68 | . = 0x100; |
| 69 | *(.scall.text) |
| 70 | *(.irq.text) |
| 71 | *(.text) |
| 72 | SCHED_TEXT |
| 73 | LOCK_TEXT |
| 74 | KPROBES_TEXT |
| 75 | *(.fixup) |
| 76 | *(.gnu.warning) |
| 77 | _etext = .; |
| 78 | } = 0xd703d703 |
| 79 | |
| 80 | . = ALIGN(4); |
| 81 | __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { |
| 82 | __start___ex_table = .; |
| 83 | *(__ex_table) |
| 84 | __stop___ex_table = .; |
| 85 | } |
| 86 | |
| 87 | RODATA |
| 88 | |
| 89 | . = ALIGN(8192); |
| 90 | |
| 91 | .data : AT(ADDR(.data) - LOAD_OFFSET) { |
| 92 | _data = .; |
| 93 | _sdata = .; |
| 94 | /* |
| 95 | * First, the init task union, aligned to an 8K boundary. |
| 96 | */ |
| 97 | *(.data.init_task) |
| 98 | |
| 99 | /* Then, the cacheline aligned data */ |
| 100 | . = ALIGN(32); |
| 101 | *(.data.cacheline_aligned) |
| 102 | |
| 103 | /* And the rest... */ |
| 104 | *(.data.rel*) |
| 105 | *(.data) |
| 106 | CONSTRUCTORS |
| 107 | |
| 108 | _edata = .; |
| 109 | } |
| 110 | |
| 111 | |
| 112 | . = ALIGN(8); |
| 113 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { |
| 114 | __bss_start = .; |
| 115 | *(.bss) |
| 116 | *(COMMON) |
| 117 | . = ALIGN(8); |
| 118 | __bss_stop = .; |
| 119 | _end = .; |
| 120 | } |
| 121 | |
| 122 | /* When something in the kernel is NOT compiled as a module, the module |
| 123 | * cleanup code and data are put into these segments. Both can then be |
| 124 | * thrown away, as cleanup code is never called unless it's a module. |
| 125 | */ |
| 126 | /DISCARD/ : { |
| 127 | *(.exit.text) |
| 128 | *(.exit.data) |
| 129 | *(.exitcall.exit) |
| 130 | } |
| 131 | |
| 132 | DWARF_DEBUG |
| 133 | } |