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.head) 26 TEXT_TEXT 27 SCHED_TEXT 28 LOCK_TEXT 29 *(.fixup) 30 *(.gnu.warning) 31 } = 0x0009 32 33 . = ALIGN(16); /* Exception table */ 34 __start___ex_table = .; 35 __ex_table : { *(__ex_table) } 36 __stop___ex_table = .; 37 38 _etext = .; /* End of text section */ 39 40 RODATA 41 42 BUG_TABLE 43 44 .data : { /* Data */ 45 DATA_DATA 46 47 /* Align the initial ramdisk image (INITRD) on page boundaries. */ 48 . = ALIGN(PAGE_SIZE); 49 __rd_start = .; 50 *(.initrd) 51 . = ALIGN(PAGE_SIZE); 52 __rd_end = .; 53 54 CONSTRUCTORS 55 } 56 57 . = ALIGN(PAGE_SIZE); 58 .data.page_aligned : { *(.data.page_aligned) } 59 __nosave_begin = .; 60 .data_nosave : { *(.data.nosave) } 61 . = ALIGN(PAGE_SIZE); 62 __nosave_end = .; 63 64 PERCPU(PAGE_SIZE) 65 .data.cacheline_aligned : { *(.data.cacheline_aligned) } 66 67 _edata = .; /* End of data section */ 68 69 . = ALIGN(THREAD_SIZE); /* init_task */ 70 .data.init_task : { *(.data.init_task) } 71 72 . = ALIGN(PAGE_SIZE); /* Init code and data */ 73 __init_begin = .; 74 _sinittext = .; 75 .init.text : { *(.init.text) } 76 _einittext = .; 77 .init.data : { *(.init.data) } 78 . = ALIGN(16); 79 __setup_start = .; 80 .init.setup : { *(.init.setup) } 81 __setup_end = .; 82 __initcall_start = .; 83 .initcall.init : { 84 INITCALLS 85 } 86 __initcall_end = .; 87 __con_initcall_start = .; 88 .con_initcall.init : { *(.con_initcall.init) } 89 __con_initcall_end = .; 90 SECURITY_INIT 91 92#ifdef CONFIG_BLK_DEV_INITRD 93 __initramfs_start = .; 94 .init.ramfs : { *(.init.ramfs) } 95 __initramfs_end = .; 96#endif 97 98 . = ALIGN(4); 99 __machvec_start = .; 100 .machvec.init : { *(.machvec.init) } 101 __machvec_end = .; 102 103 . = ALIGN(PAGE_SIZE); 104 .bss : { 105 __init_end = .; 106 __bss_start = .; /* BSS */ 107 *(.bss.page_aligned) 108 *(.bss) 109 . = ALIGN(4); 110 _end = . ; 111 } 112 113 /* When something in the kernel is NOT compiled as a module, the 114 * module cleanup code and data are put into these segments. Both 115 * can then be thrown away, as cleanup code is never called unless 116 * it's a module. 117 */ 118 /DISCARD/ : { 119 *(.exitcall.exit) 120 } 121 122 STABS_DEBUG 123 124 DWARF_DEBUG 125} 126