blob: bbf9ff485f3ae0b2c8c85c77d957b173e3f34894 [file] [log] [blame]
Mark Jonas35a398a2008-03-10 11:37:10 +01001/*
Vladimir Zapolskiy71635bd2016-11-28 00:15:28 +02002 * 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>
Wolfgang Denk35f734f2008-04-13 09:59:26 -07006 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Mark Jonas35a398a2008-03-10 11:37:10 +01008 */
9
Vladimir Zapolskiyfd717702016-11-28 00:15:25 +020010#include "config.h"
11
Mark Jonas35a398a2008-03-10 11:37:10 +010012OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
13OUTPUT_ARCH(sh)
Vladimir Zapolskiy71635bd2016-11-28 00:15:28 +020014
15MEMORY
16{
17 ram : ORIGIN = CONFIG_SYS_SDRAM_BASE, LENGTH = CONFIG_SYS_SDRAM_SIZE
18}
19
Mark Jonas35a398a2008-03-10 11:37:10 +010020ENTRY(_start)
21
22SECTIONS
23{
Vladimir Zapolskiy621f5702016-11-28 00:15:27 +020024 reloc_dst = .;
Mark Jonas35a398a2008-03-10 11:37:10 +010025
26 PROVIDE (_ftext = .);
27 PROVIDE (_fcode = .);
28 PROVIDE (_start = .);
29
30 .text :
31 {
Masahiro Yamadaa9b82be2014-06-20 16:40:14 +090032 KEEP(*/start.o (.text))
Vladimir Zapolskiy28d1b0e2016-11-28 00:15:26 +020033 KEEP(CONFIG_BOARDDIR/lowlevel_init.o (.text .spiboot1.text))
Vladimir Zapolskiyfd717702016-11-28 00:15:25 +020034 KEEP(*(.spiboot2.text))
Mark Jonas35a398a2008-03-10 11:37:10 +010035 . = ALIGN(8192);
Jean-Christophe PLAGNIOL-VILLARD4436c1e2008-09-10 22:48:01 +020036 common/env_embedded.o (.ppcenv)
Mark Jonas35a398a2008-03-10 11:37:10 +010037 . = ALIGN(8192);
Jean-Christophe PLAGNIOL-VILLARD4436c1e2008-09-10 22:48:01 +020038 common/env_embedded.o (.ppcenvr)
Mark Jonas35a398a2008-03-10 11:37:10 +010039 . = ALIGN(8192);
40 *(.text)
41 . = ALIGN(4);
Vladimir Zapolskiy71635bd2016-11-28 00:15:28 +020042 } >ram =0xFF
Mark Jonas35a398a2008-03-10 11:37:10 +010043 PROVIDE (_ecode = .);
44 .rodata :
45 {
Trent Piepho4438e5e2009-02-18 15:22:05 -080046 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
Mark Jonas35a398a2008-03-10 11:37:10 +010047 . = ALIGN(4);
Vladimir Zapolskiy71635bd2016-11-28 00:15:28 +020048 } >ram
Mark Jonas35a398a2008-03-10 11:37:10 +010049 PROVIDE (_etext = .);
50
51
52 PROVIDE (_fdata = .);
53 .data :
54 {
55 *(.data)
56 . = ALIGN(4);
Vladimir Zapolskiy71635bd2016-11-28 00:15:28 +020057 } >ram
Mark Jonas35a398a2008-03-10 11:37:10 +010058 PROVIDE (_edata = .);
59
60 PROVIDE (_fgot = .);
61 .got :
62 {
Vladimir Zapolskiy188d54f2016-11-28 00:15:35 +020063 *(.got.plt) *(.got)
Mark Jonas35a398a2008-03-10 11:37:10 +010064 . = ALIGN(4);
Vladimir Zapolskiy71635bd2016-11-28 00:15:28 +020065 } >ram
Mark Jonas35a398a2008-03-10 11:37:10 +010066 PROVIDE (_egot = .);
67
Marek Vasut607092a2012-10-12 10:27:03 +000068 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000069 KEEP(*(SORT(.u_boot_list*)));
Vladimir Zapolskiy71635bd2016-11-28 00:15:28 +020070 } >ram
Marek Vasut607092a2012-10-12 10:27:03 +000071
Simon Glass6c2afb82016-05-14 18:49:29 -060072 PROVIDE (__init_end = .);
Mark Jonas35a398a2008-03-10 11:37:10 +010073 PROVIDE (reloc_dst_end = .);
Mark Jonas35a398a2008-03-10 11:37:10 +010074
75 PROVIDE (bss_start = .);
76 PROVIDE (__bss_start = .);
77 .bss :
78 {
79 *(.bss)
80 . = ALIGN(4);
Vladimir Zapolskiy71635bd2016-11-28 00:15:28 +020081 } >ram
Mark Jonas35a398a2008-03-10 11:37:10 +010082 PROVIDE (bss_end = .);
Simon Glassed70c8f2013-03-14 06:54:53 +000083 PROVIDE (__bss_end = .);
Mark Jonas35a398a2008-03-10 11:37:10 +010084}