blob: 4beddf08e76722251b9d77182c7fc9bef508c314 [file] [log] [blame]
Albert ARIBAUD6277b192013-02-25 00:58:58 +00001/*
2 * Copyright (c) 2004-2008 Texas Instruments
3 *
4 * (C) Copyright 2002
5 * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
6 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Albert ARIBAUD6277b192013-02-25 00:58:58 +00008 */
9
10OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
11OUTPUT_ARCH(arm)
12ENTRY(_start)
13SECTIONS
14{
15 . = 0x00000000;
16
17 . = ALIGN(4);
18 .text :
19 {
20 __image_copy_start = .;
Albert ARIBAUD9852cc62014-04-15 16:13:51 +020021 *(.vectors)
Albert ARIBAUD6277b192013-02-25 00:58:58 +000022 CPUDIR/start.o (.text*)
23 *(.text*)
24 }
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);
35
36 . = .;
37
38 __image_copy_end = .;
39
40 .rel.dyn : {
41 __rel_dyn_start = .;
42 *(.rel*)
43 __rel_dyn_end = .;
44 }
45
Albert ARIBAUD9d25fa42014-02-22 17:53:42 +010046 .end :
47 {
48 *(.__end)
49 }
50
51 _image_binary_end = .;
Albert ARIBAUD6277b192013-02-25 00:58:58 +000052
Albert ARIBAUD6277b192013-02-25 00:58:58 +000053 .bss __rel_dyn_start (OVERLAY) : {
54 __bss_start = .;
55 *(.bss*)
56 . = ALIGN(4);
Tom Rini19aac972013-03-18 12:31:00 -040057 __bss_end = .;
Albert ARIBAUD6277b192013-02-25 00:58:58 +000058 }
59
Albert ARIBAUD9d25fa42014-02-22 17:53:42 +010060 .dynsym _image_binary_end : { *(.dynsym) }
Albert ARIBAUD95fc6d62013-11-07 14:21:46 +010061 .dynbss : { *(.dynbss) }
62 .dynstr : { *(.dynstr*) }
63 .dynamic : { *(.dynamic*) }
64 .hash : { *(.hash*) }
65 .plt : { *(.plt*) }
66 .interp : { *(.interp*) }
67 .gnu : { *(.gnu*) }
68 .ARM.exidx : { *(.ARM.exidx*) }
Albert ARIBAUD6277b192013-02-25 00:58:58 +000069}
70
Albert ARIBAUDe916e052013-04-12 05:14:30 +000071#if defined(CONFIG_SPL_MAX_SIZE)
72ASSERT(__image_copy_end - __image_copy_start < (CONFIG_SPL_MAX_SIZE), \
73 "SPL image too big");
74#endif
75
76#if defined(CONFIG_SPL_BSS_MAX_SIZE)
77ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS_MAX_SIZE), \
78 "SPL image BSS too big");
79#endif
80
81#if defined(CONFIG_SPL_MAX_FOOTPRINT)
82ASSERT(__bss_end - _start < (CONFIG_SPL_MAX_FOOTPRINT), \
83 "SPL image plus BSS too big");
Albert ARIBAUD6277b192013-02-25 00:58:58 +000084#endif