Kever Yang | 3cbec0a | 2019-04-01 17:15:53 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * (C) Copyright 2019 |
| 4 | * Rockchip Electronics Co., Ltd |
| 5 | * Kever Yang<kever.yang@rock-chips.com> |
| 6 | * |
| 7 | * (C) Copyright 2013 |
| 8 | * David Feng <fenghua@phytium.com.cn> |
| 9 | * |
| 10 | * (C) Copyright 2002 |
| 11 | * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
| 12 | * |
| 13 | * (C) Copyright 2010 |
| 14 | * Texas Instruments, <www.ti.com> |
| 15 | * Aneesh V <aneesh@ti.com> |
| 16 | */ |
| 17 | |
| 18 | OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64") |
| 19 | OUTPUT_ARCH(aarch64) |
| 20 | ENTRY(_start) |
| 21 | SECTIONS |
| 22 | { |
| 23 | . = 0x00000000; |
| 24 | |
| 25 | .text : { |
| 26 | . = ALIGN(8); |
| 27 | *(.__image_copy_start) |
| 28 | CPUDIR/start.o (.text*) |
| 29 | *(.text*) |
| 30 | } |
| 31 | |
| 32 | .rodata : { |
| 33 | . = ALIGN(8); |
| 34 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
| 35 | } |
| 36 | |
| 37 | .data : { |
| 38 | . = ALIGN(8); |
| 39 | *(.data*) |
| 40 | } |
| 41 | |
| 42 | .u_boot_list : { |
| 43 | . = ALIGN(8); |
| 44 | KEEP(*(SORT(.u_boot_list*))); |
| 45 | } |
| 46 | |
| 47 | .image_copy_end : { |
| 48 | . = ALIGN(8); |
| 49 | *(.__image_copy_end) |
| 50 | } |
| 51 | |
| 52 | .end : { |
| 53 | . = ALIGN(8); |
| 54 | *(.__end) |
| 55 | } |
| 56 | |
| 57 | _image_binary_end = .; |
| 58 | |
| 59 | .bss_start (NOLOAD) : { |
| 60 | . = ALIGN(8); |
| 61 | KEEP(*(.__bss_start)); |
| 62 | } |
| 63 | |
| 64 | .bss (NOLOAD) : { |
| 65 | *(.bss*) |
| 66 | . = ALIGN(8); |
| 67 | } |
| 68 | |
| 69 | .bss_end (NOLOAD) : { |
| 70 | KEEP(*(.__bss_end)); |
| 71 | } |
| 72 | |
| 73 | /DISCARD/ : { *(.dynsym) } |
| 74 | /DISCARD/ : { *(.dynstr*) } |
| 75 | /DISCARD/ : { *(.dynamic*) } |
| 76 | /DISCARD/ : { *(.plt*) } |
| 77 | /DISCARD/ : { *(.interp*) } |
| 78 | /DISCARD/ : { *(.gnu*) } |
| 79 | } |
| 80 | |
| 81 | #if defined(CONFIG_TPL_MAX_SIZE) |
| 82 | ASSERT(__image_copy_end - __image_copy_start < (CONFIG_TPL_MAX_SIZE), \ |
| 83 | "TPL image too big"); |
| 84 | #endif |
| 85 | |
| 86 | #if defined(CONFIG_TPL_BSS_MAX_SIZE) |
| 87 | ASSERT(__bss_end - __bss_start < (CONFIG_TPL_BSS_MAX_SIZE), \ |
| 88 | "TPL image BSS too big"); |
| 89 | #endif |
| 90 | |
| 91 | #if defined(CONFIG_TPL_MAX_FOOTPRINT) |
| 92 | ASSERT(__bss_end - _start < (CONFIG_TPL_MAX_FOOTPRINT), \ |
| 93 | "TPL image plus BSS too big"); |
| 94 | #endif |