| 1 |
/* |
| 2 |
* Copyright (c) 2021-2023, Arm Limited and Contributors. All rights reserved. |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: BSD-3-Clause |
| 5 |
*/ |
| 6 |
|
| 7 |
#include <common/bl_common.ld.h> |
| 8 |
#include <lib/xlat_tables/xlat_tables_defs.h> |
| 9 |
|
| 10 |
/* Mapped using 4K pages, requires us to align different sections with |
| 11 |
* different property at the same granularity. */ |
| 12 |
PAGE_SIZE_4K = 4096; |
| 13 |
|
| 14 |
OUTPUT_FORMAT("elf64-littleaarch64") |
| 15 |
OUTPUT_ARCH(aarch64) |
| 16 |
ENTRY(trp_head) |
| 17 |
|
| 18 |
MEMORY { |
| 19 |
RAM (rwx): ORIGIN = RMM_BASE, LENGTH = RMM_LIMIT - RMM_BASE |
| 20 |
} |
| 21 |
|
| 22 |
|
| 23 |
SECTIONS |
| 24 |
{ |
| 25 |
. = RMM_BASE; |
| 26 |
|
| 27 |
.text : { |
| 28 |
*(.head.text) |
| 29 |
. = ALIGN(8); |
| 30 |
*(.text*) |
| 31 |
} >RAM |
| 32 |
|
| 33 |
. = ALIGN(PAGE_SIZE_4K); |
| 34 |
|
| 35 |
.rodata : { |
| 36 |
*(.rodata*) |
| 37 |
} >RAM |
| 38 |
|
| 39 |
. = ALIGN(PAGE_SIZE_4K); |
| 40 |
|
| 41 |
__RW_START__ = . ; |
| 42 |
|
| 43 |
.data : { |
| 44 |
*(.data*) |
| 45 |
} >RAM |
| 46 |
|
| 47 |
.bss (NOLOAD) : { |
| 48 |
__BSS_START__ = .; |
| 49 |
*(.bss*) |
| 50 |
__BSS_END__ = .; |
| 51 |
} >RAM |
| 52 |
__BSS_SIZE__ = SIZEOF(.bss); |
| 53 |
|
| 54 |
|
| 55 |
STACK_SECTION >RAM |
| 56 |
|
| 57 |
|
| 58 |
/* |
| 59 |
* Define a linker symbol to mark the end of the RW memory area for this |
| 60 |
* image. |
| 61 |
*/ |
| 62 |
__RW_END__ = .; |
| 63 |
__RMM_END__ = .; |
| 64 |
|
| 65 |
|
| 66 |
/DISCARD/ : { *(.dynstr*) } |
| 67 |
/DISCARD/ : { *(.dynamic*) } |
| 68 |
/DISCARD/ : { *(.plt*) } |
| 69 |
/DISCARD/ : { *(.interp*) } |
| 70 |
/DISCARD/ : { *(.gnu*) } |
| 71 |
/DISCARD/ : { *(.note*) } |
| 72 |
} |