Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017-2018, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Antonio Nino Diaz | 54287c8 | 2018-12-05 15:37:33 +0000 | [diff] [blame] | 7 | #include <cactus_def.h> |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 8 | #include <platform_def.h> |
| 9 | #include <xlat_tables_defs.h> |
| 10 | |
| 11 | OUTPUT_FORMAT(PLATFORM_LINKER_FORMAT) |
| 12 | OUTPUT_ARCH(PLATFORM_LINKER_ARCH) |
| 13 | ENTRY(cactus_entrypoint) |
| 14 | |
| 15 | SECTIONS |
| 16 | { |
Antonio Nino Diaz | 4762fef | 2018-06-29 14:58:04 +0100 | [diff] [blame^] | 17 | . = CACTUS_IMAGE_BASE; |
| 18 | |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 19 | 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 Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 39 | .data : { |
| 40 | . = ALIGN(PAGE_SIZE); |
Antonio Nino Diaz | 54287c8 | 2018-12-05 15:37:33 +0000 | [diff] [blame] | 41 | __DATA_START__ = .; |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 42 | *(.data*) |
Antonio Nino Diaz | 54287c8 | 2018-12-05 15:37:33 +0000 | [diff] [blame] | 43 | . = NEXT(PAGE_SIZE); |
| 44 | __DATA_END__ = .; |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 45 | } |
| 46 | |
Antonio Nino Diaz | 54287c8 | 2018-12-05 15:37:33 +0000 | [diff] [blame] | 47 | .bss (NOLOAD) : { |
| 48 | . = ALIGN(PAGE_SIZE); |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 49 | __BSS_START__ = .; |
| 50 | *(SORT_BY_ALIGNMENT(.bss*)) |
| 51 | *(COMMON) |
| 52 | . = NEXT(PAGE_SIZE); |
| 53 | __BSS_END__ = .; |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 54 | } |
| 55 | } |