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")
18 #ifdef CONFIG_PMB_FIXED
19 . = CONFIG_PAGE_OFFSET + (CONFIG_MEMORY_START & 0x1fffffff) +
20 CONFIG_ZERO_PAGE_OFFSET;
21 #elif defined(CONFIG_32BIT)
22 . = CONFIG_PAGE_OFFSET + CONFIG_ZERO_PAGE_OFFSET;
24 . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
27 _text = .; /* Text and read-only data */
43 . = ALIGN(16); /* Exception table */
44 __start___ex_table = .;
45 __ex_table : { *(__ex_table) }
46 __stop___ex_table = .;
48 _etext = .; /* End of text section */
54 * Code which must be executed uncached and the associated data
58 .uncached.text : { *(.uncached.text) }
59 .uncached.data : { *(.uncached.data) }
62 . = ALIGN(THREAD_SIZE);
66 . = ALIGN(L1_CACHE_BYTES);
67 *(.data.cacheline_aligned)
69 . = ALIGN(L1_CACHE_BYTES);
84 _edata = .; /* End of data section */
86 . = ALIGN(PAGE_SIZE); /* Init code and data */
89 .init.text : { INIT_TEXT }
91 .init.data : { INIT_DATA }
95 .init.setup : { *(.init.setup) }
103 __con_initcall_start = .;
104 .con_initcall.init : { *(.con_initcall.init) }
105 __con_initcall_end = .;
109 #ifdef CONFIG_BLK_DEV_INITRD
110 . = ALIGN(PAGE_SIZE);
111 __initramfs_start = .;
112 .init.ramfs : { *(.init.ramfs) }
118 .machvec.init : { *(.machvec.init) }
124 * .exit.text is discarded at runtime, not link time, to deal with
125 * references from __bug_table
127 .exit.text : { EXIT_TEXT }
128 .exit.data : { EXIT_DATA }
130 . = ALIGN(PAGE_SIZE);
133 __bss_start = .; /* BSS */
138 _ebss = .; /* uClinux MTD sucks */
143 * When something in the kernel is NOT compiled as a module, the
144 * module cleanup code and data are put into these segments. Both
145 * can then be thrown away, as cleanup code is never called unless