blob: 8998c4985eac9a060d27a6a65ea53b03e1d09540 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Scott Wood8e728cd2015-03-24 13:25:02 -07002/*
3 * (C) Copyright 2013
4 * David Feng <fenghua@phytium.com.cn>
5 *
6 * (C) Copyright 2002
7 * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
8 *
9 * (C) Copyright 2010
10 * Texas Instruments, <www.ti.com>
11 * Aneesh V <aneesh@ti.com>
Scott Wood8e728cd2015-03-24 13:25:02 -070012 */
13
Tom Rini2aaa27d2019-01-22 17:09:26 -050014MEMORY { .sram : ORIGIN = IMAGE_TEXT_BASE,
15 LENGTH = IMAGE_MAX_SIZE }
Scott Wood8e728cd2015-03-24 13:25:02 -070016MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR,
17 LENGTH = CONFIG_SPL_BSS_MAX_SIZE }
18
19OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
20OUTPUT_ARCH(aarch64)
21ENTRY(_start)
22SECTIONS
23{
24 .text : {
25 . = ALIGN(8);
Peng Fan1b7125c2022-06-18 15:13:13 +030026 __image_copy_start = .;
Scott Wood8e728cd2015-03-24 13:25:02 -070027 CPUDIR/start.o (.text*)
28 *(.text*)
29 } >.sram
30
31 .rodata : {
32 . = ALIGN(8);
33 *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
34 } >.sram
35
36 .data : {
37 . = ALIGN(8);
38 *(.data*)
39 } >.sram
40
Peng Fan617fc292020-05-05 20:28:41 +080041#ifdef CONFIG_SPL_RECOVER_DATA_SECTION
42 .data_save : {
43 *(.__data_save_start)
44 . = SIZEOF(.data);
45 *(.__data_save_end)
46 } >.sram
47#endif
48
Andrew Scull5a9095c2022-05-30 10:00:04 +000049 __u_boot_list : {
Scott Wood8e728cd2015-03-24 13:25:02 -070050 . = ALIGN(8);
Andrew Scull5a9095c2022-05-30 10:00:04 +000051 KEEP(*(SORT(__u_boot_list*)));
Scott Wood8e728cd2015-03-24 13:25:02 -070052 } >.sram
53
54 .image_copy_end : {
55 . = ALIGN(8);
56 *(.__image_copy_end)
57 } >.sram
58
59 .end : {
60 . = ALIGN(8);
61 *(.__end)
62 } >.sram
63
Masahiro Yamada9bcc5712016-03-08 20:34:44 +090064 _image_binary_end = .;
65
Ilias Apalodimas6d1e1b82024-03-15 08:43:46 +020066 .bss : {
67 __bss_start = .;
Scott Wood8e728cd2015-03-24 13:25:02 -070068 *(.bss*)
Ilias Apalodimas6d1e1b82024-03-15 08:43:46 +020069 . = ALIGN(8);
70 __bss_end = .;
Scott Wood8e728cd2015-03-24 13:25:02 -070071 } >.sdram
72
Marek BehĂșn57fd7992021-05-20 13:24:20 +020073 /DISCARD/ : { *(.rela*) }
Scott Wood8e728cd2015-03-24 13:25:02 -070074 /DISCARD/ : { *(.dynsym) }
75 /DISCARD/ : { *(.dynstr*) }
76 /DISCARD/ : { *(.dynamic*) }
77 /DISCARD/ : { *(.plt*) }
78 /DISCARD/ : { *(.interp*) }
79 /DISCARD/ : { *(.gnu*) }
Alper Nebi Yasak463eb092022-01-29 18:27:03 +030080
81#ifdef CONFIG_LINUX_KERNEL_IMAGE_HEADER
82#include "linux-kernel-image-header-vars.h"
83#endif
Scott Wood8e728cd2015-03-24 13:25:02 -070084}
Ilias Apalodimas6d1e1b82024-03-15 08:43:46 +020085
86ASSERT(ADDR(.bss) % 8 == 0, \
87 ".bss must be 8-byte aligned");