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