blob: 9895cf9f8c77359ca7a00e32ad40c094d973a7c8 [file] [log] [blame]
Zelalem Awekec8bc23e2021-07-09 15:32:21 -05001/*
Chris Kay68d28362023-01-16 16:53:45 +00002 * Copyright (c) 2021-2023, Arm Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
Zelalem Awekec8bc23e2021-07-09 15:32:21 -05005 */
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. */
12PAGE_SIZE_4K = 4096;
13
14OUTPUT_FORMAT("elf64-littleaarch64")
15OUTPUT_ARCH(aarch64)
16ENTRY(trp_head)
17
18MEMORY {
19 RAM (rwx): ORIGIN = RMM_BASE, LENGTH = RMM_LIMIT - RMM_BASE
20}
21
22
23SECTIONS
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}