Albert ARIBAUD | 65cdd64 | 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 | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 7 | * SPDX-License-Identifier: GPL-2.0+ |
Albert ARIBAUD | 65cdd64 | 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 | 41623c9 | 2014-04-15 16:13:51 +0200 | [diff] [blame] | 21 | *(.vectors) |
Albert ARIBAUD | 65cdd64 | 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); |
| 35 | |
| 36 | . = .; |
Simon Glass | f8fff9d | 2014-11-10 17:16:52 -0700 | [diff] [blame] | 37 | #ifdef CONFIG_SPL_DM |
| 38 | .u_boot_list : { |
| 39 | KEEP(*(SORT(.u_boot_list_*_driver_*))); |
| 40 | KEEP(*(SORT(.u_boot_list_*_uclass_*))); |
| 41 | } |
| 42 | #endif |
| 43 | . = ALIGN(4); |
Albert ARIBAUD | 65cdd64 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 44 | |
| 45 | __image_copy_end = .; |
| 46 | |
| 47 | .rel.dyn : { |
| 48 | __rel_dyn_start = .; |
| 49 | *(.rel*) |
| 50 | __rel_dyn_end = .; |
| 51 | } |
| 52 | |
Albert ARIBAUD | d0b5d9d | 2014-02-22 17:53:42 +0100 | [diff] [blame] | 53 | .end : |
| 54 | { |
| 55 | *(.__end) |
| 56 | } |
| 57 | |
| 58 | _image_binary_end = .; |
Albert ARIBAUD | 65cdd64 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 59 | |
Albert ARIBAUD | 65cdd64 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 60 | .bss __rel_dyn_start (OVERLAY) : { |
| 61 | __bss_start = .; |
| 62 | *(.bss*) |
| 63 | . = ALIGN(4); |
Tom Rini | 0ce033d | 2013-03-18 12:31:00 -0400 | [diff] [blame] | 64 | __bss_end = .; |
Albert ARIBAUD | 65cdd64 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 65 | } |
| 66 | |
Albert ARIBAUD | d0b5d9d | 2014-02-22 17:53:42 +0100 | [diff] [blame] | 67 | .dynsym _image_binary_end : { *(.dynsym) } |
Albert ARIBAUD | 47ed5dd | 2013-11-07 14:21:46 +0100 | [diff] [blame] | 68 | .dynbss : { *(.dynbss) } |
| 69 | .dynstr : { *(.dynstr*) } |
| 70 | .dynamic : { *(.dynamic*) } |
| 71 | .hash : { *(.hash*) } |
| 72 | .plt : { *(.plt*) } |
| 73 | .interp : { *(.interp*) } |
| 74 | .gnu : { *(.gnu*) } |
| 75 | .ARM.exidx : { *(.ARM.exidx*) } |
Albert ARIBAUD | 65cdd64 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 76 | } |
| 77 | |
Albert ARIBAUD | 6ebc346 | 2013-04-12 05:14:30 +0000 | [diff] [blame] | 78 | #if defined(CONFIG_SPL_MAX_SIZE) |
| 79 | ASSERT(__image_copy_end - __image_copy_start < (CONFIG_SPL_MAX_SIZE), \ |
| 80 | "SPL image too big"); |
| 81 | #endif |
| 82 | |
| 83 | #if defined(CONFIG_SPL_BSS_MAX_SIZE) |
| 84 | ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS_MAX_SIZE), \ |
| 85 | "SPL image BSS too big"); |
| 86 | #endif |
| 87 | |
| 88 | #if defined(CONFIG_SPL_MAX_FOOTPRINT) |
| 89 | ASSERT(__bss_end - _start < (CONFIG_SPL_MAX_FOOTPRINT), \ |
| 90 | "SPL image plus BSS too big"); |
Albert ARIBAUD | 65cdd64 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 91 | #endif |