aboutsummaryrefslogtreecommitdiff
path: root/lib/romlib/romlib.ld.S
blob: 2aac4adf6fc86e92e8361d9a762d379c5bedbc9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include <lib/xlat_tables/xlat_tables_defs.h>
#include <platform_def.h>

MEMORY {
	ROM (rx): ORIGIN = ROMLIB_RO_BASE, LENGTH = ROMLIB_RO_LIMIT - ROMLIB_RO_BASE
	RAM (rwx): ORIGIN = ROMLIB_RW_BASE, LENGTH = ROMLIB_RW_END - ROMLIB_RW_BASE
}

OUTPUT_FORMAT(PLATFORM_LINKER_FORMAT)
OUTPUT_ARCH(PLATFORM_LINKER_ARCH)
ENTRY(jmptbl)

SECTIONS
{
	. = ROMLIB_RO_BASE;
	.text : {
		*jmptbl.o(.text)
		*(.text*)
		*(.rodata*)
	} >ROM

	__DATA_ROM_START__ = LOADADDR(.data);

	.data : {
		__DATA_RAM_START__ = .;
		*(.data*)
		__DATA_RAM_END__ = .;
	} >RAM AT>ROM

	__DATA_SIZE__ = SIZEOF(.data);

	.bss : {
		__BSS_START__ = .;
		*(.bss*)
		__BSS_END__ = .;
	 } >RAM
	__BSS_SIZE__ = SIZEOF(.bss);
}