2 * ld script to make compressed SuperH/shmedia Linux kernel+decompression
4 * Modified by Stuart Menefy from arch/sh/vmlinux.lds.S written by Niibe Yutaka
7 #include <linux/config.h>
9 #ifdef CONFIG_LITTLE_ENDIAN
10 /* OUTPUT_FORMAT("elf32-sh64l-linux", "elf32-sh64l-linux", "elf32-sh64l-linux") */
11 #define NOP 0x6ff0fff0
13 /* OUTPUT_FORMAT("elf32-sh64", "elf32-sh64", "elf32-sh64") */
14 #define NOP 0xf0fff06f
17 OUTPUT_FORMAT("elf32-sh64-linux")
21 #define ALIGNED_GAP(section, align) (((ADDR(section)+SIZEOF(section)+(align)-1) & ~((align)-1))-ADDR(section))
22 #define FOLLOWING(section, align) AT (LOADADDR(section) + ALIGNED_GAP(section,align))
26 _text = .; /* Text and read-only data */
36 .rodata : { *(.rodata) }
38 /* There is no 'real' reason for eight byte alignment, four would work
39 * as well, but gdb downloads much (*4) faster with this.
42 .image : { *(.image) }
44 _etext = .; /* End of text section */
52 _data_image = LOADADDR(.data);/* Address of data section in ROM */
54 _edata = .; /* End of data section */
56 .stack : { stack = .; _stack = .; }
59 __bss_start = .; /* BSS */