]> git.sur5r.net Git - u-boot/blob - arch/sh/cpu/u-boot.lds
sh: Fix linking of ms7722se
[u-boot] / arch / sh / cpu / u-boot.lds
1 /*
2  * Copyright (C) 2016 Vladimir Zapolskiy <vz@mleia.com>
3  * Copyright (C) 2008-2009 Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
4  * Copyright (C) 2008 Mark Jonas <mark.jonas@de.bosch.com>
5  * Copyright (C) 2007 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6  *
7  * SPDX-License-Identifier:     GPL-2.0+
8  */
9
10 #include "config.h"
11
12 #ifdef CONFIG_SYS_BIG_ENDIAN
13 OUTPUT_FORMAT("elf32-shbig-linux", "elf32-shbig-linux", "elf32-sh-linux")
14 #else
15 OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
16 #endif
17
18 OUTPUT_ARCH(sh)
19
20 MEMORY
21 {
22         ram     : ORIGIN = CONFIG_SYS_SDRAM_BASE, LENGTH = CONFIG_SYS_SDRAM_SIZE
23 }
24
25 ENTRY(_start)
26
27 SECTIONS
28 {
29         reloc_dst = .;
30
31         PROVIDE (_ftext = .);
32         PROVIDE (_fcode = .);
33         PROVIDE (_start = .);
34
35         .text :
36         {
37                 KEEP(*/start.o          (.text))
38                 KEEP(CONFIG_BOARDDIR/lowlevel_init.o    (.text .spiboot1.text))
39                 KEEP(*(.spiboot2.text))
40                 . = ALIGN(8192);
41 #ifdef CONFIG_ENV_IS_IN_FLASH
42                 env/embedded.o  (.doesnotexist)
43                 . = ALIGN(8192);
44 #endif
45                 *(.text)
46                 . = ALIGN(4);
47         } >ram =0xFF
48         PROVIDE (_ecode = .);
49         .rodata :
50         {
51                 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
52                 . = ALIGN(4);
53         } >ram
54         PROVIDE (_etext = .);
55
56
57         PROVIDE (_fdata = .);
58         .data :
59         {
60                 *(.data)
61                 . = ALIGN(4);
62         } >ram
63         PROVIDE (_edata = .);
64
65         PROVIDE (_fgot = .);
66         .got :
67         {
68                 *(.got.plt) *(.got)
69                 . = ALIGN(4);
70         } >ram
71         PROVIDE (_egot = .);
72
73         .u_boot_list : {
74                 KEEP(*(SORT(.u_boot_list*)));
75         } >ram
76
77         PROVIDE (__init_end = .);
78         PROVIDE (reloc_dst_end = .);
79
80         PROVIDE (bss_start = .);
81         PROVIDE (__bss_start = .);
82         .bss :
83         {
84                 *(.bss)
85                 . = ALIGN(4);
86         } >ram
87         PROVIDE (bss_end = .);
88         PROVIDE (__bss_end = .);
89 }