From c2e3b3bb167f0866b2c5f15690860b11d15aaa33 Mon Sep 17 00:00:00 2001 From: Alexei Fedorov Date: Fri, 31 Jul 2020 15:23:55 +0100 Subject: [PATCH] BL31: Fix relocation error for PIE This patch fixes BL31 linker error "relocation R_AARCH64_ABS32 against `a local symbol' can not be used when making a shared object" when Position Independent Executable (PIE) support is enabled with ENABLE_PIE=1 build option. Change-Id: I2692269676db3f3b27eed499fc029fffb67969be Signed-off-by: Alexei Fedorov --- plat/common/aarch64/platform_mp_stack.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plat/common/aarch64/platform_mp_stack.S b/plat/common/aarch64/platform_mp_stack.S index e2d71da7a..ee0dbb4f6 100644 --- a/plat/common/aarch64/platform_mp_stack.S +++ b/plat/common/aarch64/platform_mp_stack.S @@ -59,7 +59,8 @@ func plat_get_my_stack bic x0, x0, #(CACHE_WRITEBACK_GRANULE - 1) ret x10 #endif - .word platform_normal_stacks + /* Prevent linker from removal of stack section */ + .quad platform_normal_stacks #else /* !(IMAGE_BL31 && RECLAIM_INIT_CODE) */ mov x10, x30