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 | { |
| 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 Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 37 | .data : { |
| 38 | . = ALIGN(PAGE_SIZE); |
Antonio Nino Diaz | 54287c8 | 2018-12-05 15:37:33 +0000 | [diff] [blame^] | 39 | __DATA_START__ = .; |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 40 | *(.data*) |
Antonio Nino Diaz | 54287c8 | 2018-12-05 15:37:33 +0000 | [diff] [blame^] | 41 | . = NEXT(PAGE_SIZE); |
| 42 | __DATA_END__ = .; |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 43 | } |
| 44 | |
Antonio Nino Diaz | 54287c8 | 2018-12-05 15:37:33 +0000 | [diff] [blame^] | 45 | .bss (NOLOAD) : { |
| 46 | . = ALIGN(PAGE_SIZE); |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 47 | __BSS_START__ = .; |
| 48 | *(SORT_BY_ALIGNMENT(.bss*)) |
| 49 | *(COMMON) |
| 50 | . = NEXT(PAGE_SIZE); |
| 51 | __BSS_END__ = .; |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 52 | } |
| 53 | } |