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