Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2004-2008 Texas Instruments |
| 4 | * |
| 5 | * (C) Copyright 2002 |
| 6 | * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") |
| 10 | OUTPUT_ARCH(arm) |
| 11 | ENTRY(_start) |
| 12 | SECTIONS |
| 13 | { |
| 14 | . = 0x00000000; |
| 15 | |
| 16 | . = ALIGN(4); |
Ilias Apalodimas | cdb5839 | 2024-03-15 08:43:50 +0200 | [diff] [blame] | 17 | __image_copy_start = ADDR(.text); |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 18 | .text : |
| 19 | { |
Albert ARIBAUD | 9852cc6 | 2014-04-15 16:13:51 +0200 | [diff] [blame] | 20 | *(.vectors) |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 21 | CPUDIR/start.o (.text*) |
| 22 | *(.text*) |
Mans Rullgard | 6b2e26f | 2018-04-21 16:11:08 +0100 | [diff] [blame] | 23 | *(.glue*) |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 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); |
Andrew Scull | 5a9095c | 2022-05-30 10:00:04 +0000 | [diff] [blame] | 35 | __u_boot_list : { |
| 36 | KEEP(*(SORT(__u_boot_list*))); |
Simon Glass | 06f1c74 | 2015-06-23 15:38:30 -0600 | [diff] [blame] | 37 | } |
| 38 | |
Simon Glass | 3df10c0 | 2014-11-10 17:16:52 -0700 | [diff] [blame] | 39 | . = ALIGN(4); |
Simon Glass | 01361a2 | 2017-11-13 18:55:02 -0700 | [diff] [blame] | 40 | .binman_sym_table : { |
| 41 | __binman_sym_start = .; |
| 42 | KEEP(*(SORT(.binman_sym*))); |
| 43 | __binman_sym_end = .; |
| 44 | } |
| 45 | |
| 46 | . = ALIGN(4); |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 47 | |
| 48 | __image_copy_end = .; |
| 49 | |
| 50 | .rel.dyn : { |
| 51 | __rel_dyn_start = .; |
| 52 | *(.rel*) |
| 53 | __rel_dyn_end = .; |
| 54 | } |
| 55 | |
Albert ARIBAUD | 9d25fa4 | 2014-02-22 17:53:42 +0100 | [diff] [blame] | 56 | .end : |
| 57 | { |
| 58 | *(.__end) |
| 59 | } |
| 60 | |
| 61 | _image_binary_end = .; |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 62 | |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 63 | .bss __rel_dyn_start (OVERLAY) : { |
| 64 | __bss_start = .; |
| 65 | *(.bss*) |
| 66 | . = ALIGN(4); |
Tom Rini | 19aac97 | 2013-03-18 12:31:00 -0400 | [diff] [blame] | 67 | __bss_end = .; |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 68 | } |
Simon Glass | 89caf33 | 2015-06-23 15:38:29 -0600 | [diff] [blame] | 69 | __bss_size = __bss_end - __bss_start; |
Albert ARIBAUD | 9d25fa4 | 2014-02-22 17:53:42 +0100 | [diff] [blame] | 70 | .dynsym _image_binary_end : { *(.dynsym) } |
Albert ARIBAUD | 95fc6d6 | 2013-11-07 14:21:46 +0100 | [diff] [blame] | 71 | .dynbss : { *(.dynbss) } |
| 72 | .dynstr : { *(.dynstr*) } |
| 73 | .dynamic : { *(.dynamic*) } |
| 74 | .hash : { *(.hash*) } |
| 75 | .plt : { *(.plt*) } |
| 76 | .interp : { *(.interp*) } |
| 77 | .gnu : { *(.gnu*) } |
| 78 | .ARM.exidx : { *(.ARM.exidx*) } |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 79 | } |
| 80 | |
Tom Rini | 2aaa27d | 2019-01-22 17:09:26 -0500 | [diff] [blame] | 81 | #if defined(IMAGE_MAX_SIZE) |
Simon Goldschmidt | a76a458 | 2019-04-25 21:22:39 +0200 | [diff] [blame] | 82 | ASSERT(__image_copy_end - __image_copy_start <= (IMAGE_MAX_SIZE), \ |
Albert ARIBAUD | e916e05 | 2013-04-12 05:14:30 +0000 | [diff] [blame] | 83 | "SPL image too big"); |
| 84 | #endif |
| 85 | |
| 86 | #if defined(CONFIG_SPL_BSS_MAX_SIZE) |
Simon Goldschmidt | a76a458 | 2019-04-25 21:22:39 +0200 | [diff] [blame] | 87 | ASSERT(__bss_end - __bss_start <= (CONFIG_SPL_BSS_MAX_SIZE), \ |
Albert ARIBAUD | e916e05 | 2013-04-12 05:14:30 +0000 | [diff] [blame] | 88 | "SPL image BSS too big"); |
| 89 | #endif |
| 90 | |
| 91 | #if defined(CONFIG_SPL_MAX_FOOTPRINT) |
Simon Goldschmidt | a76a458 | 2019-04-25 21:22:39 +0200 | [diff] [blame] | 92 | ASSERT(__bss_end - _start <= (CONFIG_SPL_MAX_FOOTPRINT), \ |
Albert ARIBAUD | e916e05 | 2013-04-12 05:14:30 +0000 | [diff] [blame] | 93 | "SPL image plus BSS too big"); |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 94 | #endif |