xref: /openbmc/u-boot/arch/sh/cpu/u-boot.lds (revision 9ec4a67e)
1/*
2 * Copyright (C) 2007
3 * Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 *
5 * Copyright (C) 2008-2009
6 * Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
7 *
8 * Copyright (C) 2008
9 * Mark Jonas <mark.jonas@de.bosch.com>
10 *
11 * SPDX-License-Identifier:	GPL-2.0+
12 */
13
14#include "config.h"
15
16OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
17OUTPUT_ARCH(sh)
18ENTRY(_start)
19
20SECTIONS
21{
22	/*
23	 * entry and reloct_dst will be provided via ldflags
24	 */
25	. = .;
26
27	PROVIDE (_ftext = .);
28	PROVIDE (_fcode = .);
29	PROVIDE (_start = .);
30
31	.text :
32	{
33		KEEP(*/start.o		(.text))
34		KEEP(CONFIG_BOARDDIR/lowlevel_init.o	(.text .spiboot1.text))
35		KEEP(*(.spiboot2.text))
36		. = ALIGN(8192);
37		common/env_embedded.o	(.ppcenv)
38		. = ALIGN(8192);
39		common/env_embedded.o	(.ppcenvr)
40		. = ALIGN(8192);
41		*(.text)
42		. = ALIGN(4);
43	} =0xFF
44	PROVIDE (_ecode = .);
45	.rodata :
46	{
47		*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
48		. = ALIGN(4);
49	}
50	PROVIDE (_etext = .);
51
52
53	PROVIDE (_fdata = .);
54	.data :
55	{
56		*(.data)
57		. = ALIGN(4);
58	}
59	PROVIDE (_edata = .);
60
61	PROVIDE (_fgot = .);
62	.got :
63	{
64		*(.got)
65		. = ALIGN(4);
66	}
67	PROVIDE (_egot = .);
68
69
70	.u_boot_list : {
71		KEEP(*(SORT(.u_boot_list*)));
72	}
73
74	PROVIDE (__init_end = .);
75	PROVIDE (reloc_dst_end = .);
76	/* _reloc_dst_end = .; */
77
78	PROVIDE (bss_start = .);
79	PROVIDE (__bss_start = .);
80	.bss :
81	{
82		*(.bss)
83		. = ALIGN(4);
84	}
85	PROVIDE (bss_end = .);
86
87	PROVIDE (__bss_end = .);
88}
89