Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2004-2008 Texas Instruments |
| 3 | * |
| 4 | * (C) Copyright 2002 |
| 5 | * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
| 6 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | * SPDX-License-Identifier: GPL-2.0+ |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") |
| 11 | OUTPUT_ARCH(arm) |
| 12 | ENTRY(_start) |
| 13 | SECTIONS |
| 14 | { |
| 15 | . = 0x00000000; |
| 16 | |
| 17 | . = ALIGN(4); |
| 18 | .text : |
| 19 | { |
| 20 | __image_copy_start = .; |
Albert ARIBAUD | 9852cc6 | 2014-04-15 16:13:51 +0200 | [diff] [blame] | 21 | *(.vectors) |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 22 | 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); |
Simon Glass | 06f1c74 | 2015-06-23 15:38:30 -0600 | [diff] [blame] | 35 | .u_boot_list : { |
Tom Rini | 0ed608e | 2016-03-15 17:56:29 -0400 | [diff] [blame] | 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); |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 40 | |
| 41 | __image_copy_end = .; |
| 42 | |
| 43 | .rel.dyn : { |
| 44 | __rel_dyn_start = .; |
| 45 | *(.rel*) |
| 46 | __rel_dyn_end = .; |
| 47 | } |
| 48 | |
Albert ARIBAUD | 9d25fa4 | 2014-02-22 17:53:42 +0100 | [diff] [blame] | 49 | .end : |
| 50 | { |
| 51 | *(.__end) |
| 52 | } |
| 53 | |
| 54 | _image_binary_end = .; |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 55 | |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 56 | .bss __rel_dyn_start (OVERLAY) : { |
| 57 | __bss_start = .; |
| 58 | *(.bss*) |
| 59 | . = ALIGN(4); |
Tom Rini | 19aac97 | 2013-03-18 12:31:00 -0400 | [diff] [blame] | 60 | __bss_end = .; |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 61 | } |
Simon Glass | 89caf33 | 2015-06-23 15:38:29 -0600 | [diff] [blame] | 62 | __bss_size = __bss_end - __bss_start; |
Albert ARIBAUD | 9d25fa4 | 2014-02-22 17:53:42 +0100 | [diff] [blame] | 63 | .dynsym _image_binary_end : { *(.dynsym) } |
Albert ARIBAUD | 95fc6d6 | 2013-11-07 14:21:46 +0100 | [diff] [blame] | 64 | .dynbss : { *(.dynbss) } |
| 65 | .dynstr : { *(.dynstr*) } |
| 66 | .dynamic : { *(.dynamic*) } |
| 67 | .hash : { *(.hash*) } |
| 68 | .plt : { *(.plt*) } |
| 69 | .interp : { *(.interp*) } |
| 70 | .gnu : { *(.gnu*) } |
| 71 | .ARM.exidx : { *(.ARM.exidx*) } |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 72 | } |
| 73 | |
Albert ARIBAUD | e916e05 | 2013-04-12 05:14:30 +0000 | [diff] [blame] | 74 | #if defined(CONFIG_SPL_MAX_SIZE) |
| 75 | ASSERT(__image_copy_end - __image_copy_start < (CONFIG_SPL_MAX_SIZE), \ |
| 76 | "SPL image too big"); |
| 77 | #endif |
| 78 | |
| 79 | #if defined(CONFIG_SPL_BSS_MAX_SIZE) |
| 80 | ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS_MAX_SIZE), \ |
| 81 | "SPL image BSS too big"); |
| 82 | #endif |
| 83 | |
| 84 | #if defined(CONFIG_SPL_MAX_FOOTPRINT) |
| 85 | ASSERT(__bss_end - _start < (CONFIG_SPL_MAX_FOOTPRINT), \ |
| 86 | "SPL image plus BSS too big"); |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 87 | #endif |