Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2013 |
| 4 | * David Feng <fenghua@phytium.com.cn> |
| 5 | * |
| 6 | * (C) Copyright 2002 |
| 7 | * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
| 8 | * |
| 9 | * (C) Copyright 2010 |
| 10 | * Texas Instruments, <www.ti.com> |
| 11 | * Aneesh V <aneesh@ti.com> |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 12 | */ |
| 13 | |
Tom Rini | 2aaa27d | 2019-01-22 17:09:26 -0500 | [diff] [blame] | 14 | MEMORY { .sram : ORIGIN = IMAGE_TEXT_BASE, |
| 15 | LENGTH = IMAGE_MAX_SIZE } |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 16 | MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR, |
| 17 | LENGTH = CONFIG_SPL_BSS_MAX_SIZE } |
| 18 | |
| 19 | OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64") |
| 20 | OUTPUT_ARCH(aarch64) |
| 21 | ENTRY(_start) |
| 22 | SECTIONS |
| 23 | { |
Ilias Apalodimas | cdb5839 | 2024-03-15 08:43:50 +0200 | [diff] [blame] | 24 | __image_copy_start = ADDR(.text); |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 25 | .text : { |
| 26 | . = ALIGN(8); |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 27 | CPUDIR/start.o (.text*) |
| 28 | *(.text*) |
| 29 | } >.sram |
| 30 | |
| 31 | .rodata : { |
| 32 | . = ALIGN(8); |
| 33 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
| 34 | } >.sram |
| 35 | |
| 36 | .data : { |
| 37 | . = ALIGN(8); |
| 38 | *(.data*) |
| 39 | } >.sram |
| 40 | |
Peng Fan | 617fc29 | 2020-05-05 20:28:41 +0800 | [diff] [blame] | 41 | #ifdef CONFIG_SPL_RECOVER_DATA_SECTION |
| 42 | .data_save : { |
| 43 | *(.__data_save_start) |
| 44 | . = SIZEOF(.data); |
| 45 | *(.__data_save_end) |
| 46 | } >.sram |
| 47 | #endif |
| 48 | |
Andrew Scull | 5a9095c | 2022-05-30 10:00:04 +0000 | [diff] [blame] | 49 | __u_boot_list : { |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 50 | . = ALIGN(8); |
Andrew Scull | 5a9095c | 2022-05-30 10:00:04 +0000 | [diff] [blame] | 51 | KEEP(*(SORT(__u_boot_list*))); |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 52 | } >.sram |
| 53 | |
Ilias Apalodimas | cdb5839 | 2024-03-15 08:43:50 +0200 | [diff] [blame] | 54 | . = ALIGN(8); |
| 55 | __image_copy_end = .; |
Ilias Apalodimas | 8080846 | 2024-05-28 09:18:27 +0300 | [diff] [blame] | 56 | _end = .; |
Masahiro Yamada | 9bcc571 | 2016-03-08 20:34:44 +0900 | [diff] [blame] | 57 | _image_binary_end = .; |
| 58 | |
Ilias Apalodimas | 6d1e1b8 | 2024-03-15 08:43:46 +0200 | [diff] [blame] | 59 | .bss : { |
| 60 | __bss_start = .; |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 61 | *(.bss*) |
Ilias Apalodimas | 6d1e1b8 | 2024-03-15 08:43:46 +0200 | [diff] [blame] | 62 | . = ALIGN(8); |
| 63 | __bss_end = .; |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 64 | } >.sdram |
| 65 | |
Marek BehĂșn | 57fd799 | 2021-05-20 13:24:20 +0200 | [diff] [blame] | 66 | /DISCARD/ : { *(.rela*) } |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 67 | /DISCARD/ : { *(.dynsym) } |
| 68 | /DISCARD/ : { *(.dynstr*) } |
| 69 | /DISCARD/ : { *(.dynamic*) } |
| 70 | /DISCARD/ : { *(.plt*) } |
| 71 | /DISCARD/ : { *(.interp*) } |
| 72 | /DISCARD/ : { *(.gnu*) } |
Alper Nebi Yasak | 463eb09 | 2022-01-29 18:27:03 +0300 | [diff] [blame] | 73 | |
| 74 | #ifdef CONFIG_LINUX_KERNEL_IMAGE_HEADER |
| 75 | #include "linux-kernel-image-header-vars.h" |
| 76 | #endif |
Scott Wood | 8e728cd | 2015-03-24 13:25:02 -0700 | [diff] [blame] | 77 | } |
Ilias Apalodimas | 6d1e1b8 | 2024-03-15 08:43:46 +0200 | [diff] [blame] | 78 | |
| 79 | ASSERT(ADDR(.bss) % 8 == 0, \ |
| 80 | ".bss must be 8-byte aligned"); |