1/* ld script to make Meta Linux kernel */ 2 3#include <asm/thread_info.h> 4#include <asm/page.h> 5#include <asm/cache.h> 6 7#include <asm-generic/vmlinux.lds.h> 8 9OUTPUT_FORMAT("elf32-metag", "elf32-metag", "elf32-metag") 10OUTPUT_ARCH(metag) 11ENTRY(__start) 12 13_jiffies = _jiffies_64; 14SECTIONS 15{ 16 . = CONFIG_PAGE_OFFSET; 17 _text = .; 18 __text = .; 19 __stext = .; 20 HEAD_TEXT_SECTION 21 .text : { 22 TEXT_TEXT 23 SCHED_TEXT 24 CPUIDLE_TEXT 25 LOCK_TEXT 26 KPROBES_TEXT 27 IRQENTRY_TEXT 28 SOFTIRQENTRY_TEXT 29 *(.text.*) 30 *(.gnu.warning) 31 } 32 33 __etext = .; /* End of text section */ 34 35 __sdata = .; 36 RO_DATA_SECTION(PAGE_SIZE) 37 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) 38 __edata = .; /* End of data section */ 39 40 EXCEPTION_TABLE(16) 41 NOTES 42 43 . = ALIGN(PAGE_SIZE); /* Init code and data */ 44 ___init_begin = .; 45 INIT_TEXT_SECTION(PAGE_SIZE) 46 INIT_DATA_SECTION(16) 47 48 .init.arch.info : { 49 ___arch_info_begin = .; 50 *(.arch.info.init) 51 ___arch_info_end = .; 52 } 53 54 PERCPU_SECTION(L1_CACHE_BYTES) 55 56 ___init_end = .; 57 58 BSS_SECTION(0, PAGE_SIZE, 0) 59 60 __end = .; 61 62 . = ALIGN(PAGE_SIZE); 63 __heap_start = .; 64 65 DWARF_DEBUG 66 67 /* When something in the kernel is NOT compiled as a module, the 68 * module cleanup code and data are put into these segments. Both 69 * can then be thrown away, as cleanup code is never called unless 70 * it's a module. 71 */ 72 DISCARDS 73} 74