From d66f081f065f54b33fc521b06aa9032b4a6dff09 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 3 Jun 2025 06:25:18 -0700 Subject: [PATCH] arch: riscv: core: Fix type riscv_cpu_wake_flag and riscv_cpu_sp are variables, not functions, so they should use the GDATA macro instead of the GTEXT macro. Otherwise, the linker will warn when LTO is enabled: ld.bfd: warning: type of symbol `riscv_cpu_wake_flag' changed from 2 to 1 in /tmp/cc39w5oK.ltrans0.ltrans.o ld.bfd: warning: type of symbol `riscv_cpu_sp' changed from 2 to 1 in /tmp/cc39w5oK.ltrans0.ltrans.o Signed-off-by: Tom Hughes --- arch/riscv/core/reset.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/core/reset.S b/arch/riscv/core/reset.S index af96cb9757e..f0477ae1734 100644 --- a/arch/riscv/core/reset.S +++ b/arch/riscv/core/reset.S @@ -17,8 +17,8 @@ GTEXT(__reset) /* imports */ GTEXT(z_prep_c) -GTEXT(riscv_cpu_wake_flag) -GTEXT(riscv_cpu_sp) +GDATA(riscv_cpu_wake_flag) +GDATA(riscv_cpu_sp) GTEXT(arch_secondary_cpu_init) #if CONFIG_INCLUDE_RESET_VECTOR