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 */ 5OUTPUT_ARCH(arm) 6ENTRY(stext) 7SECTIONS 8{ 9 . = TEXTADDR; 10 .init : { /* Init code and data */ 11 _stext = .; 12 __init_begin = .; 13 *(.text.init) 14 __proc_info_begin = .; 15 *(.proc.info) 16 __proc_info_end = .; 17 __arch_info_begin = .; 18 *(.arch.info) 19 __arch_info_end = .; 20 __tagtable_begin = .; 21 *(.taglist) 22 __tagtable_end = .; 23 *(.data.init) 24 . = ALIGN(16); 25 __setup_start = .; 26 *(.setup.init) 27 __setup_end = .; 28 __initcall_start = .; 29 *(.initcall.init) 30 __initcall_end = .; 31 . = ALIGN(4096); 32 __init_end = .; 33 } 34 35 /DISCARD/ : { /* Exit code and data */ 36 *(.text.exit) 37 *(.data.exit) 38 *(.exitcall.exit) 39 } 40 41 .text : { /* Real text segment */ 42 _text = .; /* Text and read-only data */ 43 *(.text) 44 *(.fixup) 45 *(.gnu.warning) 46 *(.rodata) 47 *(.rodata.*) 48 *(.glue_7) 49 *(.glue_7t) 50 *(.got) /* Global offset table */ 51 52 _etext = .; /* End of text section */ 53 } 54 55 .kstrtab : { *(.kstrtab) } 56 57 . = ALIGN(16); 58 __ex_table : { /* Exception table */ 59 __start___ex_table = .; 60 *(__ex_table) 61 __stop___ex_table = .; 62 } 63 64 __ksymtab : { /* Kernel symbol table */ 65 __start___ksymtab = .; 66 *(__ksymtab) 67 __stop___ksymtab = .; 68 } 69 70 . = ALIGN(8192); 71 72 .data : { 73 /* 74 * first, the init task union, aligned 75 * to an 8192 byte boundary. 76 */ 77 *(.init.task) 78 79 /* 80 * then the cacheline aligned data 81 */ 82 . = ALIGN(32); 83 *(.data.cacheline_aligned) 84 85 /* 86 * and the usual data section 87 */ 88 *(.data) 89 CONSTRUCTORS 90 91 _edata = .; 92 } 93 94 .bss : { 95 __bss_start = .; /* BSS */ 96 *(.bss) 97 *(COMMON) 98 _end = . ; 99 } 100 /* Stabs debugging sections. */ 101 .stab 0 : { *(.stab) } 102 .stabstr 0 : { *(.stabstr) } 103 .stab.excl 0 : { *(.stab.excl) } 104 .stab.exclstr 0 : { *(.stab.exclstr) } 105 .stab.index 0 : { *(.stab.index) } 106 .stab.indexstr 0 : { *(.stab.indexstr) } 107 .comment 0 : { *(.comment) } 108} 109