blob: 8f22170fe6261b98549f10a47fe818d77ceea3eb [file] [log] [blame]
Daniel Boulbyb1b058d2018-09-18 11:52:49 +01001/*
2 * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6#ifndef ARM_RECLAIM_INIT_LD_S
7#define ARM_RECLAIM_INIT_LD_S
8
9SECTIONS
10{
11 .init __STACKS_START__ : {
12 . = . + PLATFORM_STACK_SIZE;
13 . = ALIGN(PAGE_SIZE);
14 __INIT_CODE_START__ = .;
15 /*
16 * Exclude PSCI initialization functions to ensure the init section
17 * does not become larger than the overlaid stack region
18 */
19 *(EXCLUDE_FILE (*psci_setup.o).text.init*)
20 __INIT_CODE_UNALIGNED__ = .;
21 . = ALIGN(PAGE_SIZE);
22 __INIT_CODE_END__ = .;
23 } >RAM
24
25#ifdef BL31_PROGBITS_LIMIT
26 ASSERT(__INIT_CODE_END__ <= BL31_PROGBITS_LIMIT,
27 "BL31 init has exceeded progbits limit.")
28#endif
29
30#if RECLAIM_INIT_CODE
31 ASSERT(__INIT_CODE_END__ <= __STACKS_END__,
32 "Init code ends past the end of the stacks")
33#endif
34}
35
36#endif /* ARM_RECLAIM_INIT_LD_S */