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#include <asm/cache.h> 13#include <asm/thread_info.h> 14 15OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32") 16OUTPUT_ARCH(avr32) 17ENTRY(_start) 18 19/* Big endian */ 20jiffies = jiffies_64 + 4; 21 22SECTIONS 23{ 24 . = CONFIG_ENTRY_ADDRESS; 25 .init : AT(ADDR(.init) - LOAD_OFFSET) { 26 _text = .; 27 __init_begin = .; 28 _sinittext = .; 29 *(.text.reset) 30 INIT_TEXT 31 /* 32 * .exit.text is discarded at runtime, not 33 * link time, to deal with references from 34 * __bug_table 35 */ 36 EXIT_TEXT 37 _einittext = .; 38 . = ALIGN(4); 39 __tagtable_begin = .; 40 *(.taglist.init) 41 __tagtable_end = .; 42 } 43 INIT_DATA_SECTION(16) 44 . = ALIGN(PAGE_SIZE); 45 __init_end = .; 46 47 .text : AT(ADDR(.text) - LOAD_OFFSET) { 48 _evba = .; 49 _stext = .; 50 *(.ex.text) 51 *(.irq.text) 52 KPROBES_TEXT 53 TEXT_TEXT 54 SCHED_TEXT 55 CPUIDLE_TEXT 56 LOCK_TEXT 57 *(.fixup) 58 *(.gnu.warning) 59 _etext = .; 60 } = 0xd703d703 61 62 EXCEPTION_TABLE(4) 63 RODATA 64 65 .data : AT(ADDR(.data) - LOAD_OFFSET) { 66 _data = .; 67 _sdata = .; 68 69 INIT_TASK_DATA(THREAD_SIZE) 70 PAGE_ALIGNED_DATA(PAGE_SIZE); 71 CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES) 72 *(.data.rel*) 73 DATA_DATA 74 CONSTRUCTORS 75 76 _edata = .; 77 } 78 79 BSS_SECTION(0, 8, 8) 80 _end = .; 81 82 DWARF_DEBUG 83 84 /* When something in the kernel is NOT compiled as a module, the module 85 * cleanup code and data are put into these segments. Both can then be 86 * thrown away, as cleanup code is never called unless it's a module. 87 */ 88 DISCARDS 89} 90