blob: eee463a1b1c6f8ace4808f74f709cfdc6a37674b [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Albert ARIBAUD6277b192013-02-25 00:58:58 +00002/*
3 * Copyright (c) 2004-2008 Texas Instruments
4 *
5 * (C) Copyright 2002
6 * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
Albert ARIBAUD6277b192013-02-25 00:58:58 +00007 */
8
9OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
10OUTPUT_ARCH(arm)
11ENTRY(_start)
12SECTIONS
13{
14 . = 0x00000000;
15
16 . = ALIGN(4);
Ilias Apalodimascdb58392024-03-15 08:43:50 +020017 __image_copy_start = ADDR(.text);
Albert ARIBAUD6277b192013-02-25 00:58:58 +000018 .text :
19 {
Albert ARIBAUD9852cc62014-04-15 16:13:51 +020020 *(.vectors)
Albert ARIBAUD6277b192013-02-25 00:58:58 +000021 CPUDIR/start.o (.text*)
22 *(.text*)
Mans Rullgard6b2e26f2018-04-21 16:11:08 +010023 *(.glue*)
Albert ARIBAUD6277b192013-02-25 00:58:58 +000024 }
25
26 . = ALIGN(4);
27 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
28
29 . = ALIGN(4);
30 .data : {
31 *(.data*)
32 }
33
34 . = ALIGN(4);
Andrew Scull5a9095c2022-05-30 10:00:04 +000035 __u_boot_list : {
36 KEEP(*(SORT(__u_boot_list*)));
Simon Glass06f1c742015-06-23 15:38:30 -060037 }
38
Simon Glass3df10c02014-11-10 17:16:52 -070039 . = ALIGN(4);
Simon Glass01361a22017-11-13 18:55:02 -070040 .binman_sym_table : {
41 __binman_sym_start = .;
42 KEEP(*(SORT(.binman_sym*)));
43 __binman_sym_end = .;
44 }
45
46 . = ALIGN(4);
Albert ARIBAUD6277b192013-02-25 00:58:58 +000047
48 __image_copy_end = .;
49
50 .rel.dyn : {
51 __rel_dyn_start = .;
52 *(.rel*)
53 __rel_dyn_end = .;
54 }
55
Albert ARIBAUD9d25fa42014-02-22 17:53:42 +010056 _image_binary_end = .;
Ilias Apalodimas80808462024-05-28 09:18:27 +030057 _end = .;
Albert ARIBAUD6277b192013-02-25 00:58:58 +000058
Albert ARIBAUD6277b192013-02-25 00:58:58 +000059 .bss __rel_dyn_start (OVERLAY) : {
60 __bss_start = .;
61 *(.bss*)
62 . = ALIGN(4);
Tom Rini19aac972013-03-18 12:31:00 -040063 __bss_end = .;
Albert ARIBAUD6277b192013-02-25 00:58:58 +000064 }
Simon Glass89caf332015-06-23 15:38:29 -060065 __bss_size = __bss_end - __bss_start;
Albert ARIBAUD9d25fa42014-02-22 17:53:42 +010066 .dynsym _image_binary_end : { *(.dynsym) }
Albert ARIBAUD95fc6d62013-11-07 14:21:46 +010067 .dynbss : { *(.dynbss) }
68 .dynstr : { *(.dynstr*) }
69 .dynamic : { *(.dynamic*) }
70 .hash : { *(.hash*) }
71 .plt : { *(.plt*) }
72 .interp : { *(.interp*) }
73 .gnu : { *(.gnu*) }
74 .ARM.exidx : { *(.ARM.exidx*) }
Albert ARIBAUD6277b192013-02-25 00:58:58 +000075}
76
Tom Rini2aaa27d2019-01-22 17:09:26 -050077#if defined(IMAGE_MAX_SIZE)
Simon Goldschmidta76a4582019-04-25 21:22:39 +020078ASSERT(__image_copy_end - __image_copy_start <= (IMAGE_MAX_SIZE), \
Albert ARIBAUDe916e052013-04-12 05:14:30 +000079 "SPL image too big");
80#endif
81
82#if defined(CONFIG_SPL_BSS_MAX_SIZE)
Simon Goldschmidta76a4582019-04-25 21:22:39 +020083ASSERT(__bss_end - __bss_start <= (CONFIG_SPL_BSS_MAX_SIZE), \
Albert ARIBAUDe916e052013-04-12 05:14:30 +000084 "SPL image BSS too big");
85#endif
86
87#if defined(CONFIG_SPL_MAX_FOOTPRINT)
Simon Goldschmidta76a4582019-04-25 21:22:39 +020088ASSERT(__bss_end - _start <= (CONFIG_SPL_MAX_FOOTPRINT), \
Albert ARIBAUDe916e052013-04-12 05:14:30 +000089 "SPL image plus BSS too big");
Albert ARIBAUD6277b192013-02-25 00:58:58 +000090#endif