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 = .; |
| 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 ARIBAUD | 9d25fa4 | 2014-02-22 17:53:42 +0100 | [diff] [blame] | 45 | .end : |
| 46 | { |
| 47 | *(.__end) |
| 48 | } |
| 49 | |
| 50 | _image_binary_end = .; |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 51 | |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 52 | .bss __rel_dyn_start (OVERLAY) : { |
| 53 | __bss_start = .; |
| 54 | *(.bss*) |
| 55 | . = ALIGN(4); |
Tom Rini | 19aac97 | 2013-03-18 12:31:00 -0400 | [diff] [blame] | 56 | __bss_end = .; |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 57 | } |
| 58 | |
Albert ARIBAUD | 9d25fa4 | 2014-02-22 17:53:42 +0100 | [diff] [blame] | 59 | .dynsym _image_binary_end : { *(.dynsym) } |
Albert ARIBAUD | 95fc6d6 | 2013-11-07 14:21:46 +0100 | [diff] [blame] | 60 | .dynbss : { *(.dynbss) } |
| 61 | .dynstr : { *(.dynstr*) } |
| 62 | .dynamic : { *(.dynamic*) } |
| 63 | .hash : { *(.hash*) } |
| 64 | .plt : { *(.plt*) } |
| 65 | .interp : { *(.interp*) } |
| 66 | .gnu : { *(.gnu*) } |
| 67 | .ARM.exidx : { *(.ARM.exidx*) } |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 68 | } |
| 69 | |
Albert ARIBAUD | e916e05 | 2013-04-12 05:14:30 +0000 | [diff] [blame] | 70 | #if defined(CONFIG_SPL_MAX_SIZE) |
| 71 | ASSERT(__image_copy_end - __image_copy_start < (CONFIG_SPL_MAX_SIZE), \ |
| 72 | "SPL image too big"); |
| 73 | #endif |
| 74 | |
| 75 | #if defined(CONFIG_SPL_BSS_MAX_SIZE) |
| 76 | ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS_MAX_SIZE), \ |
| 77 | "SPL image BSS too big"); |
| 78 | #endif |
| 79 | |
| 80 | #if defined(CONFIG_SPL_MAX_FOOTPRINT) |
| 81 | ASSERT(__bss_end - _start < (CONFIG_SPL_MAX_FOOTPRINT), \ |
| 82 | "SPL image plus BSS too big"); |
Albert ARIBAUD | 6277b19 | 2013-02-25 00:58:58 +0000 | [diff] [blame] | 83 | #endif |