blob: 36cc54a292e8cacae5b82e7375d32a69da23710f [file] [log] [blame]
Albert ARIBAUD65cdd642013-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 Denk1a459662013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Albert ARIBAUD65cdd642013-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 = .;
21 CPUDIR/start.o (.text*)
22 *(.text*)
23 }
24
25 . = ALIGN(4);
26 .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
27
28 . = ALIGN(4);
29 .data : {
30 *(.data*)
31 }
32
33 . = ALIGN(4);
34
35 . = .;
36
37 __image_copy_end = .;
38
39 .rel.dyn : {
40 __rel_dyn_start = .;
41 *(.rel*)
42 __rel_dyn_end = .;
43 }
44
Albert ARIBAUD65cdd642013-02-25 00:58:58 +000045 _end = .;
46
Albert ARIBAUD65cdd642013-02-25 00:58:58 +000047 .bss __rel_dyn_start (OVERLAY) : {
48 __bss_start = .;
49 *(.bss*)
50 . = ALIGN(4);
Tom Rini0ce033d2013-03-18 12:31:00 -040051 __bss_end = .;
Albert ARIBAUD65cdd642013-02-25 00:58:58 +000052 }
53
Albert ARIBAUD09d81182013-06-11 14:17:31 +020054 /DISCARD/ : { *(.dynsym) }
Albert ARIBAUD65cdd642013-02-25 00:58:58 +000055 /DISCARD/ : { *(.dynstr*) }
56 /DISCARD/ : { *(.dynamic*) }
57 /DISCARD/ : { *(.plt*) }
58 /DISCARD/ : { *(.interp*) }
59 /DISCARD/ : { *(.gnu*) }
60}
61
Albert ARIBAUD6ebc3462013-04-12 05:14:30 +000062#if defined(CONFIG_SPL_MAX_SIZE)
63ASSERT(__image_copy_end - __image_copy_start < (CONFIG_SPL_MAX_SIZE), \
64 "SPL image too big");
65#endif
66
67#if defined(CONFIG_SPL_BSS_MAX_SIZE)
68ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS_MAX_SIZE), \
69 "SPL image BSS too big");
70#endif
71
72#if defined(CONFIG_SPL_MAX_FOOTPRINT)
73ASSERT(__bss_end - _start < (CONFIG_SPL_MAX_FOOTPRINT), \
74 "SPL image plus BSS too big");
Albert ARIBAUD65cdd642013-02-25 00:58:58 +000075#endif