1/* $Id: vmlinux.lds.S,v 1.8 2003/05/16 17:18:14 lethal Exp $ 2 * ld script to make SuperH Linux kernel 3 * Written by Niibe Yutaka 4 */ 5#include <asm/thread_info.h> 6#include <asm/cache.h> 7#include <asm-generic/vmlinux.lds.h> 8 9#ifdef CONFIG_CPU_LITTLE_ENDIAN 10OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux") 11#else 12OUTPUT_FORMAT("elf32-shbig-linux", "elf32-shbig-linux", "elf32-shbig-linux") 13#endif 14OUTPUT_ARCH(sh) 15ENTRY(_start) 16SECTIONS 17{ 18 . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET; 19 _text = .; /* Text and read-only data */ 20 text = .; /* Text and read-only data */ 21 .empty_zero_page : { 22 *(.empty_zero_page) 23 } = 0 24 .text : { 25 TEXT_TEXT 26 SCHED_TEXT 27 LOCK_TEXT 28 *(.fixup) 29 *(.gnu.warning) 30 } = 0x0009 31 32 . = ALIGN(16); /* Exception table */ 33 __start___ex_table = .; 34 __ex_table : { *(__ex_table) } 35 __stop___ex_table = .; 36 37 _etext = .; /* End of text section */ 38 39 RODATA 40 41 BUG_TABLE 42 43 .data : { /* Data */ 44 DATA_DATA 45 46 /* Align the initial ramdisk image (INITRD) on page boundaries. */ 47 . = ALIGN(PAGE_SIZE); 48 __rd_start = .; 49 *(.initrd) 50 . = ALIGN(PAGE_SIZE); 51 __rd_end = .; 52 53 CONSTRUCTORS 54 } 55 56 . = ALIGN(PAGE_SIZE); 57 .data.page_aligned : { *(.data.page_aligned) } 58 __nosave_begin = .; 59 .data_nosave : { *(.data.nosave) } 60 . = ALIGN(PAGE_SIZE); 61 __nosave_end = .; 62 63 . = ALIGN(PAGE_SIZE); 64 __per_cpu_start = .; 65 .data.percpu : { *(.data.percpu) } 66 __per_cpu_end = .; 67 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 68 69 _edata = .; /* End of data section */ 70 71 . = ALIGN(THREAD_SIZE); /* init_task */ 72 .data.init_task : { *(.data.init_task) } 73 74 . = ALIGN(PAGE_SIZE); /* Init code and data */ 75 __init_begin = .; 76 _sinittext = .; 77 .init.text : { *(.init.text) } 78 _einittext = .; 79 .init.data : { *(.init.data) } 80 . = ALIGN(16); 81 __setup_start = .; 82 .init.setup : { *(.init.setup) } 83 __setup_end = .; 84 __initcall_start = .; 85 .initcall.init : { 86 INITCALLS 87 } 88 __initcall_end = .; 89 __con_initcall_start = .; 90 .con_initcall.init : { *(.con_initcall.init) } 91 __con_initcall_end = .; 92 SECURITY_INIT 93 94#ifdef CONFIG_BLK_DEV_INITRD 95 __initramfs_start = .; 96 .init.ramfs : { *(.init.ramfs) } 97 __initramfs_end = .; 98#endif 99 100 . = ALIGN(4); 101 __machvec_start = .; 102 .machvec.init : { *(.machvec.init) } 103 __machvec_end = .; 104 105 . = ALIGN(PAGE_SIZE); 106 .bss : { 107 __init_end = .; 108 __bss_start = .; /* BSS */ 109 *(.bss.page_aligned) 110 *(.bss) 111 . = ALIGN(4); 112 _end = . ; 113 } 114 115 /* When something in the kernel is NOT compiled as a module, the 116 * module cleanup code and data are put into these segments. Both 117 * can then be thrown away, as cleanup code is never called unless 118 * it's a module. 119 */ 120 /DISCARD/ : { 121 *(.exitcall.exit) 122 } 123 124 STABS_DEBUG 125 126 DWARF_DEBUG 127} 128