2 * ld script to make SuperH Linux kernel
3 * Written by Niibe Yutaka
5 #include <asm/thread_info.h>
7 #include <asm-generic/vmlinux.lds.h>
9 #ifdef CONFIG_CPU_LITTLE_ENDIAN
10 OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
12 OUTPUT_FORMAT("elf32-shbig-linux", "elf32-shbig-linux", "elf32-shbig-linux")
19 . = CONFIG_PAGE_OFFSET + CONFIG_ZERO_PAGE_OFFSET;
21 . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
24 _text = .; /* Text and read-only data */
40 . = ALIGN(16); /* Exception table */
41 __start___ex_table = .;
42 __ex_table : { *(__ex_table) }
43 __stop___ex_table = .;
45 _etext = .; /* End of text section */
51 * Code which must be executed uncached and the associated data
55 .uncached.text : { *(.uncached.text) }
56 .uncached.data : { *(.uncached.data) }
59 . = ALIGN(THREAD_SIZE);
63 . = ALIGN(L1_CACHE_BYTES);
64 *(.data.cacheline_aligned)
66 . = ALIGN(L1_CACHE_BYTES);
81 _edata = .; /* End of data section */
83 . = ALIGN(PAGE_SIZE); /* Init code and data */
86 .init.text : { INIT_TEXT }
88 .init.data : { INIT_DATA }
92 .init.setup : { *(.init.setup) }
100 __con_initcall_start = .;
101 .con_initcall.init : { *(.con_initcall.init) }
102 __con_initcall_end = .;
106 #ifdef CONFIG_BLK_DEV_INITRD
107 . = ALIGN(PAGE_SIZE);
108 __initramfs_start = .;
109 .init.ramfs : { *(.init.ramfs) }
115 .machvec.init : { *(.machvec.init) }
121 * .exit.text is discarded at runtime, not link time, to deal with
122 * references from __bug_table
124 .exit.text : { EXIT_TEXT }
125 .exit.data : { EXIT_DATA }
127 . = ALIGN(PAGE_SIZE);
130 __bss_start = .; /* BSS */
135 _ebss = .; /* uClinux MTD sucks */
140 * When something in the kernel is NOT compiled as a module, the
141 * module cleanup code and data are put into these segments. Both
142 * can then be thrown away, as cleanup code is never called unless