From 6c87abdda400354ebf4f5351086c32a4620475c9 Mon Sep 17 00:00:00 2001 From: Manish Pandey Date: Wed, 11 May 2022 15:43:54 +0100 Subject: [PATCH] fix(arm): remove reclamation of functions starting with "init" When RECLAIM_INIT_CODE is enabled, functions with __init attribute can be reclaimed after boot and marked as Execute Never. Because of a bug in linker script the functions starting with "init" were also marked XN and causing instruction abort. Signed-off-by: Manish Pandey Change-Id: I2221973c05af170acf4e723cd44645b9ff9d58d2 --- include/plat/arm/common/arm_reclaim_init.ld.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/plat/arm/common/arm_reclaim_init.ld.S b/include/plat/arm/common/arm_reclaim_init.ld.S index 717f65e2b..788e9ff56 100644 --- a/include/plat/arm/common/arm_reclaim_init.ld.S +++ b/include/plat/arm/common/arm_reclaim_init.ld.S @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2022, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -12,7 +12,7 @@ SECTIONS . = . + PLATFORM_STACK_SIZE; . = ALIGN(PAGE_SIZE); __INIT_CODE_START__ = .; - *(*text.init*); + *(*text.init.*); __INIT_CODE_END__ = .; INIT_CODE_END_ALIGNED = ALIGN(PAGE_SIZE); } >RAM