aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh64/boot/compressed/vmlinux.lds.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh64/boot/compressed/vmlinux.lds.S')
-rw-r--r--arch/sh64/boot/compressed/vmlinux.lds.S65
1 files changed, 65 insertions, 0 deletions
diff --git a/arch/sh64/boot/compressed/vmlinux.lds.S b/arch/sh64/boot/compressed/vmlinux.lds.S
new file mode 100644
index 000000000000..15a737d9bba8
--- /dev/null
+++ b/arch/sh64/boot/compressed/vmlinux.lds.S
@@ -0,0 +1,65 @@
1/*
2 * ld script to make compressed SuperH/shmedia Linux kernel+decompression
3 * bootstrap
4 * Modified by Stuart Menefy from arch/sh/vmlinux.lds.S written by Niibe Yutaka
5 */
6
7#include <linux/config.h>
8
9#ifdef CONFIG_LITTLE_ENDIAN
10/* OUTPUT_FORMAT("elf32-sh64l-linux", "elf32-sh64l-linux", "elf32-sh64l-linux") */
11#define NOP 0x6ff0fff0
12#else
13/* OUTPUT_FORMAT("elf32-sh64", "elf32-sh64", "elf32-sh64") */
14#define NOP 0xf0fff06f
15#endif
16
17OUTPUT_FORMAT("elf32-sh64-linux")
18OUTPUT_ARCH(sh)
19ENTRY(_start)
20
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))
23
24SECTIONS
25{
26 _text = .; /* Text and read-only data */
27
28 .text : {
29 *(.text)
30 *(.text64)
31 *(.text..SHmedia32)
32 *(.fixup)
33 *(.gnu.warning)
34 } = NOP
35 . = ALIGN(4);
36 .rodata : { *(.rodata) }
37
38 /* There is no 'real' reason for eight byte alignment, four would work
39 * as well, but gdb downloads much (*4) faster with this.
40 */
41 . = ALIGN(8);
42 .image : { *(.image) }
43 . = ALIGN(4);
44 _etext = .; /* End of text section */
45
46 .data : /* Data */
47 FOLLOWING(.image, 4)
48 {
49 _data = .;
50 *(.data)
51 }
52 _data_image = LOADADDR(.data);/* Address of data section in ROM */
53
54 _edata = .; /* End of data section */
55
56 .stack : { stack = .; _stack = .; }
57
58 . = ALIGN(4);
59 __bss_start = .; /* BSS */
60 .bss : {
61 *(.bss)
62 }
63 . = ALIGN(4);
64 _end = . ;
65}