blob: 58553ace276c79c4777f1c79617225b27cb0e86a [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{
17 ASSERT(. == ALIGN(PAGE_SIZE),
18 "TEXT_START address is not aligned to PAGE_SIZE.")
19
20 .text : {
21 __TEXT_START__ = .;
22 *cactus_entrypoint.o(.text*)
23 *(.text*)
24 *(.vectors)
25 . = NEXT(PAGE_SIZE);
26 __TEXT_END__ = .;
27 }
28
29 .rodata : {
30 . = ALIGN(PAGE_SIZE);
31 __RODATA_START__ = .;
32 *(.rodata*)
33 . = NEXT(PAGE_SIZE);
34 __RODATA_END__ = .;
35 }
36
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020037 .data : {
38 . = ALIGN(PAGE_SIZE);
Antonio Nino Diaz54287c82018-12-05 15:37:33 +000039 __DATA_START__ = .;
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020040 *(.data*)
Antonio Nino Diaz54287c82018-12-05 15:37:33 +000041 . = NEXT(PAGE_SIZE);
42 __DATA_END__ = .;
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020043 }
44
Antonio Nino Diaz54287c82018-12-05 15:37:33 +000045 .bss (NOLOAD) : {
46 . = ALIGN(PAGE_SIZE);
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020047 __BSS_START__ = .;
48 *(SORT_BY_ALIGNMENT(.bss*))
49 *(COMMON)
50 . = NEXT(PAGE_SIZE);
51 __BSS_END__ = .;
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020052 }
53}