blob: a3d8e65d0bcb57bedb069e7c18e8eeb86f940a34 [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001/*
2 * Copyright (c) 2017-2018, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaz54287c82018-12-05 15:37:33 +00007#include <cactus_def.h>
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02008#include <platform_def.h>
9#include <xlat_tables_defs.h>
10
11OUTPUT_FORMAT(PLATFORM_LINKER_FORMAT)
12OUTPUT_ARCH(PLATFORM_LINKER_ARCH)
13ENTRY(cactus_entrypoint)
14
15SECTIONS
16{
Antonio Nino Diaz4762fef2018-06-29 14:58:04 +010017 . = CACTUS_IMAGE_BASE;
18
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020019 ASSERT(. == ALIGN(PAGE_SIZE),
20 "TEXT_START address is not aligned to PAGE_SIZE.")
21
22 .text : {
23 __TEXT_START__ = .;
24 *cactus_entrypoint.o(.text*)
25 *(.text*)
26 *(.vectors)
27 . = NEXT(PAGE_SIZE);
28 __TEXT_END__ = .;
29 }
30
31 .rodata : {
32 . = ALIGN(PAGE_SIZE);
33 __RODATA_START__ = .;
34 *(.rodata*)
35 . = NEXT(PAGE_SIZE);
36 __RODATA_END__ = .;
37 }
38
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020039 .data : {
40 . = ALIGN(PAGE_SIZE);
Antonio Nino Diaz54287c82018-12-05 15:37:33 +000041 __DATA_START__ = .;
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020042 *(.data*)
Antonio Nino Diaz54287c82018-12-05 15:37:33 +000043 . = NEXT(PAGE_SIZE);
44 __DATA_END__ = .;
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020045 }
46
Antonio Nino Diaz54287c82018-12-05 15:37:33 +000047 .bss (NOLOAD) : {
48 . = ALIGN(PAGE_SIZE);
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020049 __BSS_START__ = .;
50 *(SORT_BY_ALIGNMENT(.bss*))
51 *(COMMON)
52 . = NEXT(PAGE_SIZE);
53 __BSS_END__ = .;
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020054 }
55}