Kever Yang | 87ce4bc | 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 | |
Ilias Apalodimas | cdb5839 | 2024-03-15 08:43:50 +0200 | [diff] [blame^] | 25 | __image_copy_start = ADDR(.text); |
Kever Yang | 87ce4bc | 2019-04-01 17:15:53 +0800 | [diff] [blame] | 26 | .text : { |
| 27 | . = ALIGN(8); |
Kever Yang | 87ce4bc | 2019-04-01 17:15:53 +0800 | [diff] [blame] | 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 | |
Andrew Scull | 5a9095c | 2022-05-30 10:00:04 +0000 | [diff] [blame] | 42 | __u_boot_list : { |
Kever Yang | 87ce4bc | 2019-04-01 17:15:53 +0800 | [diff] [blame] | 43 | . = ALIGN(8); |
Andrew Scull | 5a9095c | 2022-05-30 10:00:04 +0000 | [diff] [blame] | 44 | KEEP(*(SORT(__u_boot_list*))); |
Kever Yang | 87ce4bc | 2019-04-01 17:15:53 +0800 | [diff] [blame] | 45 | } |
| 46 | |
Ilias Apalodimas | cdb5839 | 2024-03-15 08:43:50 +0200 | [diff] [blame^] | 47 | . = ALIGN(8); |
| 48 | __image_copy_end = .; |
Kever Yang | 87ce4bc | 2019-04-01 17:15:53 +0800 | [diff] [blame] | 49 | |
| 50 | .end : { |
| 51 | . = ALIGN(8); |
| 52 | *(.__end) |
| 53 | } |
| 54 | |
| 55 | _image_binary_end = .; |
| 56 | |
Ilias Apalodimas | 6d1e1b8 | 2024-03-15 08:43:46 +0200 | [diff] [blame] | 57 | .bss ALIGN(8) : { |
| 58 | __bss_start = .; |
Kever Yang | 87ce4bc | 2019-04-01 17:15:53 +0800 | [diff] [blame] | 59 | *(.bss*) |
Ilias Apalodimas | 6d1e1b8 | 2024-03-15 08:43:46 +0200 | [diff] [blame] | 60 | . = ALIGN(8); |
| 61 | __bss_end = .; |
Kever Yang | 87ce4bc | 2019-04-01 17:15:53 +0800 | [diff] [blame] | 62 | } |
| 63 | |
| 64 | /DISCARD/ : { *(.dynsym) } |
| 65 | /DISCARD/ : { *(.dynstr*) } |
| 66 | /DISCARD/ : { *(.dynamic*) } |
| 67 | /DISCARD/ : { *(.plt*) } |
| 68 | /DISCARD/ : { *(.interp*) } |
| 69 | /DISCARD/ : { *(.gnu*) } |
| 70 | } |
| 71 | |
| 72 | #if defined(CONFIG_TPL_MAX_SIZE) |
| 73 | ASSERT(__image_copy_end - __image_copy_start < (CONFIG_TPL_MAX_SIZE), \ |
| 74 | "TPL image too big"); |
| 75 | #endif |
| 76 | |
| 77 | #if defined(CONFIG_TPL_BSS_MAX_SIZE) |
| 78 | ASSERT(__bss_end - __bss_start < (CONFIG_TPL_BSS_MAX_SIZE), \ |
| 79 | "TPL image BSS too big"); |
| 80 | #endif |
| 81 | |
| 82 | #if defined(CONFIG_TPL_MAX_FOOTPRINT) |
| 83 | ASSERT(__bss_end - _start < (CONFIG_TPL_MAX_FOOTPRINT), \ |
| 84 | "TPL image plus BSS too big"); |
| 85 | #endif |