blob: 6f38563303793f32996b3223121eb780ddaa55ce [file] [log] [blame]
Mark Jonas35a398a2008-03-10 11:37:10 +01001/*
2 * Copyright (C) 2007
Mark Jonas35a398a2008-03-10 11:37:10 +01003 * Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 *
Masahiro Yamadaa9b82be2014-06-20 16:40:14 +09005 * Copyright (C) 2008-2009
6 * Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
7 *
Mark Jonas35a398a2008-03-10 11:37:10 +01008 * Copyright (C) 2008
9 * Mark Jonas <mark.jonas@de.bosch.com>
Wolfgang Denk35f734f2008-04-13 09:59:26 -070010 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +020011 * SPDX-License-Identifier: GPL-2.0+
Mark Jonas35a398a2008-03-10 11:37:10 +010012 */
13
Vladimir Zapolskiyfd717702016-11-28 00:15:25 +020014#include "config.h"
15
Mark Jonas35a398a2008-03-10 11:37:10 +010016OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
17OUTPUT_ARCH(sh)
18ENTRY(_start)
19
20SECTIONS
21{
22 /*
Jean-Christophe PLAGNIOL-VILLARD6e743892009-06-04 12:06:44 +020023 * entry and reloct_dst will be provided via ldflags
24 */
25 . = .;
Mark Jonas35a398a2008-03-10 11:37:10 +010026
27 PROVIDE (_ftext = .);
28 PROVIDE (_fcode = .);
29 PROVIDE (_start = .);
30
31 .text :
32 {
Masahiro Yamadaa9b82be2014-06-20 16:40:14 +090033 KEEP(*/start.o (.text))
Vladimir Zapolskiyfd717702016-11-28 00:15:25 +020034 KEEP(CONFIG_BOARDDIR/lowlevel_init.o (.spiboot1.text))
35 KEEP(*(.spiboot2.text))
Mark Jonas35a398a2008-03-10 11:37:10 +010036 . = ALIGN(8192);
Jean-Christophe PLAGNIOL-VILLARD4436c1e2008-09-10 22:48:01 +020037 common/env_embedded.o (.ppcenv)
Mark Jonas35a398a2008-03-10 11:37:10 +010038 . = ALIGN(8192);
Jean-Christophe PLAGNIOL-VILLARD4436c1e2008-09-10 22:48:01 +020039 common/env_embedded.o (.ppcenvr)
Mark Jonas35a398a2008-03-10 11:37:10 +010040 . = ALIGN(8192);
41 *(.text)
42 . = ALIGN(4);
43 } =0xFF
44 PROVIDE (_ecode = .);
45 .rodata :
46 {
Trent Piepho4438e5e2009-02-18 15:22:05 -080047 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
Mark Jonas35a398a2008-03-10 11:37:10 +010048 . = 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
Mark Jonas35a398a2008-03-10 11:37:10 +010069
Marek Vasut607092a2012-10-12 10:27:03 +000070 .u_boot_list : {
Albert ARIBAUDc24895e2013-02-25 00:59:00 +000071 KEEP(*(SORT(.u_boot_list*)));
Marek Vasut607092a2012-10-12 10:27:03 +000072 }
73
Simon Glass6c2afb82016-05-14 18:49:29 -060074 PROVIDE (__init_end = .);
Mark Jonas35a398a2008-03-10 11:37:10 +010075 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
Simon Glassed70c8f2013-03-14 06:54:53 +000087 PROVIDE (__bss_end = .);
Mark Jonas35a398a2008-03-10 11:37:10 +010088}