Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Michal Simek | e60148d | 2014-01-14 14:21:52 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2014 Xilinx, Inc. Michal Simek |
| 4 | * Copyright (c) 2004-2008 Texas Instruments |
| 5 | * |
| 6 | * (C) Copyright 2002 |
| 7 | * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
Michal Simek | e60148d | 2014-01-14 14:21:52 +0100 | [diff] [blame] | 8 | */ |
| 9 | |
Tom Rini | 2aaa27d | 2019-01-22 17:09:26 -0500 | [diff] [blame] | 10 | MEMORY { .sram : ORIGIN = IMAGE_TEXT_BASE,\ |
| 11 | LENGTH = IMAGE_MAX_SIZE } |
Michal Simek | e60148d | 2014-01-14 14:21:52 +0100 | [diff] [blame] | 12 | MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \ |
| 13 | LENGTH = CONFIG_SPL_BSS_MAX_SIZE } |
| 14 | |
| 15 | OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") |
| 16 | OUTPUT_ARCH(arm) |
| 17 | ENTRY(_start) |
| 18 | SECTIONS |
| 19 | { |
| 20 | . = ALIGN(4); |
Ilias Apalodimas | cdb5839 | 2024-03-15 08:43:50 +0200 | [diff] [blame] | 21 | __image_copy_start = ADDR(.text); |
Michal Simek | e60148d | 2014-01-14 14:21:52 +0100 | [diff] [blame] | 22 | .text : |
| 23 | { |
Peter Crosthwaite | 8a0e77b | 2014-08-07 22:26:43 +1000 | [diff] [blame] | 24 | *(.vectors) |
Michal Simek | e60148d | 2014-01-14 14:21:52 +0100 | [diff] [blame] | 25 | CPUDIR/start.o (.text*) |
| 26 | *(.text*) |
| 27 | } > .sram |
| 28 | |
| 29 | . = ALIGN(4); |
| 30 | .rodata : { |
| 31 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
| 32 | } > .sram |
| 33 | |
| 34 | . = ALIGN(4); |
| 35 | .data : { |
| 36 | *(.data*) |
| 37 | } > .sram |
| 38 | |
| 39 | . = ALIGN(4); |
Andrew Scull | 5a9095c | 2022-05-30 10:00:04 +0000 | [diff] [blame] | 40 | __u_boot_list : { |
| 41 | KEEP(*(SORT(__u_boot_list*))); |
Simon Glass | 6093336 | 2015-10-17 19:41:23 -0600 | [diff] [blame] | 42 | } > .sram |
| 43 | |
| 44 | . = ALIGN(4); |
Michal Simek | e60148d | 2014-01-14 14:21:52 +0100 | [diff] [blame] | 45 | |
Simon Glass | 6093336 | 2015-10-17 19:41:23 -0600 | [diff] [blame] | 46 | _image_binary_end = .; |
Michal Simek | e60148d | 2014-01-14 14:21:52 +0100 | [diff] [blame] | 47 | |
| 48 | _end = .; |
| 49 | |
| 50 | /* Move BSS section to RAM because of FAT */ |
| 51 | .bss (NOLOAD) : { |
| 52 | __bss_start = .; |
| 53 | *(.bss*) |
| 54 | . = ALIGN(4); |
| 55 | __bss_end = .; |
| 56 | } > .sdram |
| 57 | |
| 58 | /DISCARD/ : { *(.dynsym) } |
| 59 | /DISCARD/ : { *(.dynstr*) } |
| 60 | /DISCARD/ : { *(.dynamic*) } |
| 61 | /DISCARD/ : { *(.plt*) } |
| 62 | /DISCARD/ : { *(.interp*) } |
| 63 | /DISCARD/ : { *(.gnu*) } |
| 64 | } |