James Hogan | 5633004 | 2012-10-09 10:54:32 +0100 | [diff] [blame] | 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 | |
| 9 | OUTPUT_FORMAT("elf32-metag", "elf32-metag", "elf32-metag") |
| 10 | OUTPUT_ARCH(metag) |
| 11 | ENTRY(__start) |
| 12 | |
| 13 | _jiffies = _jiffies_64; |
| 14 | SECTIONS |
| 15 | { |
| 16 | . = CONFIG_PAGE_OFFSET; |
| 17 | _text = .; |
| 18 | __text = .; |
| 19 | __stext = .; |
| 20 | HEAD_TEXT_SECTION |
| 21 | .text : { |
| 22 | TEXT_TEXT |
| 23 | SCHED_TEXT |
| 24 | LOCK_TEXT |
| 25 | KPROBES_TEXT |
| 26 | IRQENTRY_TEXT |
Alexander Potapenko | be7635e | 2016-03-25 14:22:05 -0700 | [diff] [blame^] | 27 | SOFTIRQENTRY_TEXT |
James Hogan | 5633004 | 2012-10-09 10:54:32 +0100 | [diff] [blame] | 28 | *(.text.*) |
| 29 | *(.gnu.warning) |
| 30 | } |
| 31 | |
| 32 | __etext = .; /* End of text section */ |
| 33 | |
| 34 | __sdata = .; |
| 35 | RO_DATA_SECTION(PAGE_SIZE) |
| 36 | RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) |
| 37 | __edata = .; /* End of data section */ |
| 38 | |
| 39 | EXCEPTION_TABLE(16) |
| 40 | NOTES |
| 41 | |
| 42 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
| 43 | ___init_begin = .; |
| 44 | INIT_TEXT_SECTION(PAGE_SIZE) |
| 45 | INIT_DATA_SECTION(16) |
| 46 | |
| 47 | .init.arch.info : { |
| 48 | ___arch_info_begin = .; |
| 49 | *(.arch.info.init) |
| 50 | ___arch_info_end = .; |
| 51 | } |
| 52 | |
| 53 | PERCPU_SECTION(L1_CACHE_BYTES) |
| 54 | |
| 55 | ___init_end = .; |
| 56 | |
| 57 | BSS_SECTION(0, PAGE_SIZE, 0) |
| 58 | |
| 59 | __end = .; |
| 60 | |
| 61 | . = ALIGN(PAGE_SIZE); |
| 62 | __heap_start = .; |
| 63 | |
| 64 | DWARF_DEBUG |
| 65 | |
| 66 | /* When something in the kernel is NOT compiled as a module, the |
| 67 | * module cleanup code and data are put into these segments. Both |
| 68 | * can then be thrown away, as cleanup code is never called unless |
| 69 | * it's a module. |
| 70 | */ |
| 71 | DISCARDS |
| 72 | } |