Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* ld script to make ARM Linux kernel |
| 2 | * taken from the i386 version by Russell King |
| 3 | * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz> |
| 4 | * borrowed from Russels ARM port by Ian Molton |
| 5 | */ |
| 6 | |
| 7 | #include <asm-generic/vmlinux.lds.h> |
| 8 | |
| 9 | OUTPUT_ARCH(arm) |
| 10 | ENTRY(stext) |
| 11 | jiffies = jiffies_64; |
| 12 | SECTIONS |
| 13 | { |
| 14 | . = TEXTADDR; |
| 15 | .init : { /* Init code and data */ |
| 16 | _stext = .; |
| 17 | __init_begin = .; |
| 18 | _sinittext = .; |
| 19 | *(.init.text) |
| 20 | _einittext = .; |
| 21 | __proc_info_begin = .; |
| 22 | *(.proc.info) |
| 23 | __proc_info_end = .; |
| 24 | __arch_info_begin = .; |
| 25 | *(.arch.info) |
| 26 | __arch_info_end = .; |
| 27 | __tagtable_begin = .; |
| 28 | *(.taglist) |
| 29 | __tagtable_end = .; |
| 30 | . = ALIGN(16); |
| 31 | __setup_start = .; |
| 32 | *(.init.setup) |
| 33 | __setup_end = .; |
| 34 | __early_begin = .; |
| 35 | *(__early_param) |
| 36 | __early_end = .; |
| 37 | __initcall_start = .; |
| 38 | *(.initcall1.init) |
| 39 | *(.initcall2.init) |
| 40 | *(.initcall3.init) |
| 41 | *(.initcall4.init) |
| 42 | *(.initcall5.init) |
| 43 | *(.initcall6.init) |
| 44 | *(.initcall7.init) |
| 45 | __initcall_end = .; |
| 46 | __con_initcall_start = .; |
| 47 | *(.con_initcall.init) |
| 48 | __con_initcall_end = .; |
| 49 | . = ALIGN(32); |
| 50 | __initramfs_start = .; |
| 51 | usr/built-in.o(.init.ramfs) |
| 52 | __initramfs_end = .; |
| 53 | . = ALIGN(32768); |
| 54 | __init_end = .; |
| 55 | } |
| 56 | |
| 57 | /DISCARD/ : { /* Exit code and data */ |
| 58 | *(.exit.text) |
| 59 | *(.exit.data) |
| 60 | *(.exitcall.exit) |
| 61 | } |
| 62 | |
| 63 | .text : { /* Real text segment */ |
| 64 | _text = .; /* Text and read-only data */ |
| 65 | *(.text) |
| 66 | SCHED_TEXT |
| 67 | LOCK_TEXT /* FIXME - borrowed from arm32 - check*/ |
| 68 | *(.fixup) |
| 69 | *(.gnu.warning) |
| 70 | *(.rodata) |
| 71 | *(.rodata.*) |
| 72 | *(.glue_7) |
| 73 | *(.glue_7t) |
| 74 | *(.got) /* Global offset table */ |
| 75 | |
| 76 | _etext = .; /* End of text section */ |
| 77 | } |
| 78 | |
| 79 | . = ALIGN(16); |
| 80 | __ex_table : { /* Exception table */ |
| 81 | __start___ex_table = .; |
| 82 | *(__ex_table) |
| 83 | __stop___ex_table = .; |
| 84 | } |
| 85 | |
| 86 | RODATA |
| 87 | |
| 88 | _endtext = .; |
| 89 | |
| 90 | . = DATAADDR; |
| 91 | |
| 92 | _sdata = .; |
| 93 | |
| 94 | .data : { |
| 95 | . = ALIGN(8192); |
| 96 | /* |
| 97 | * first, the init thread union, aligned |
| 98 | * to an 8192 byte boundary. (see arm26/kernel/init_task.c) |
| 99 | * FIXME - sould this be 32K aligned on arm26? |
| 100 | */ |
| 101 | *(.init.task) |
| 102 | |
| 103 | /* |
| 104 | * The cacheline aligned data |
| 105 | */ |
| 106 | . = ALIGN(32); |
| 107 | *(.data.cacheline_aligned) |
| 108 | |
| 109 | /* |
| 110 | * and the usual data section |
| 111 | */ |
| 112 | *(.data) |
| 113 | CONSTRUCTORS |
| 114 | |
| 115 | *(.init.data) |
| 116 | |
| 117 | _edata = .; |
| 118 | } |
| 119 | |
| 120 | .bss : { |
| 121 | __bss_start = .; /* BSS */ |
| 122 | *(.bss) |
| 123 | *(COMMON) |
| 124 | _end = . ; |
| 125 | } |
| 126 | /* Stabs debugging sections. */ |
| 127 | .stab 0 : { *(.stab) } |
| 128 | .stabstr 0 : { *(.stabstr) } |
| 129 | .stab.excl 0 : { *(.stab.excl) } |
| 130 | .stab.exclstr 0 : { *(.stab.exclstr) } |
| 131 | .stab.index 0 : { *(.stab.index) } |
| 132 | .stab.indexstr 0 : { *(.stab.indexstr) } |
| 133 | .comment 0 : { *(.comment) } |
| 134 | } |