Michal Simek | d7e269c | 2014-01-14 14:21:52 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2014 Xilinx, Inc. Michal Simek |
| 3 | * Copyright (c) 2004-2008 Texas Instruments |
| 4 | * |
| 5 | * (C) Copyright 2002 |
| 6 | * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
| 7 | * |
| 8 | * SPDX-License-Identifier: GPL-2.0+ |
| 9 | */ |
| 10 | |
| 11 | MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE,\ |
| 12 | LENGTH = CONFIG_SPL_MAX_SIZE } |
| 13 | MEMORY { .sdram : ORIGIN = CONFIG_SPL_BSS_START_ADDR, \ |
| 14 | LENGTH = CONFIG_SPL_BSS_MAX_SIZE } |
| 15 | |
| 16 | OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") |
| 17 | OUTPUT_ARCH(arm) |
| 18 | ENTRY(_start) |
| 19 | SECTIONS |
| 20 | { |
| 21 | . = ALIGN(4); |
| 22 | .text : |
| 23 | { |
| 24 | __image_copy_start = .; |
Peter Crosthwaite | fb8d876 | 2014-08-07 22:26:43 +1000 | [diff] [blame] | 25 | *(.vectors) |
Michal Simek | d7e269c | 2014-01-14 14:21:52 +0100 | [diff] [blame] | 26 | CPUDIR/start.o (.text*) |
| 27 | *(.text*) |
| 28 | } > .sram |
| 29 | |
| 30 | . = ALIGN(4); |
| 31 | .rodata : { |
| 32 | *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) |
| 33 | } > .sram |
| 34 | |
| 35 | . = ALIGN(4); |
| 36 | .data : { |
| 37 | *(.data*) |
| 38 | } > .sram |
| 39 | |
| 40 | . = ALIGN(4); |
Simon Glass | 71556fb | 2015-10-17 19:41:23 -0600 | [diff] [blame] | 41 | #ifdef CONFIG_SPL_DM |
| 42 | .u_boot_list : { |
| 43 | KEEP(*(SORT(.u_boot_list_*_driver_*))); |
| 44 | KEEP(*(SORT(.u_boot_list_*_uclass_*))); |
| 45 | } > .sram |
| 46 | |
| 47 | . = ALIGN(4); |
| 48 | #endif |
Michal Simek | d7e269c | 2014-01-14 14:21:52 +0100 | [diff] [blame] | 49 | |
| 50 | . = .; |
| 51 | |
Simon Glass | 71556fb | 2015-10-17 19:41:23 -0600 | [diff] [blame] | 52 | _image_binary_end = .; |
Michal Simek | d7e269c | 2014-01-14 14:21:52 +0100 | [diff] [blame] | 53 | |
| 54 | _end = .; |
| 55 | |
| 56 | /* Move BSS section to RAM because of FAT */ |
| 57 | .bss (NOLOAD) : { |
| 58 | __bss_start = .; |
| 59 | *(.bss*) |
| 60 | . = ALIGN(4); |
| 61 | __bss_end = .; |
| 62 | } > .sdram |
| 63 | |
| 64 | /DISCARD/ : { *(.dynsym) } |
| 65 | /DISCARD/ : { *(.dynstr*) } |
| 66 | /DISCARD/ : { *(.dynamic*) } |
| 67 | /DISCARD/ : { *(.plt*) } |
| 68 | /DISCARD/ : { *(.interp*) } |
| 69 | /DISCARD/ : { *(.gnu*) } |
| 70 | } |