From 90a6ced9c154c4ccf84725829f694ccbbdb3d344 Mon Sep 17 00:00:00 2001 From: guoshichao Date: Thu, 4 Jul 2024 15:40:55 +0800 Subject: [PATCH] arch/arm/toolchain: add --entry_std LDFLAGS for different toolchain Signed-off-by: guoshichao --- arch/arm/src/common/Toolchain.defs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/src/common/Toolchain.defs b/arch/arm/src/common/Toolchain.defs index 24e2f6df8f..b4ca0a06bd 100644 --- a/arch/arm/src/common/Toolchain.defs +++ b/arch/arm/src/common/Toolchain.defs @@ -205,6 +205,8 @@ ifeq ($(CONFIG_ARM_TOOLCHAIN_CLANG),y) ARCHCPUFLAGS := $(TOOLCHAIN_CLANG_OPTION) $(TOOLCHAIN_CLANG_CONFIG).cfg $(ARCHCPUFLAGS) endif + LDFLAGS += --entry=__start + # ARM Compiler Clang toolchain else ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),y) @@ -247,6 +249,8 @@ else ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),y) LDFLAGS += --diag_suppress=6329 + LDFLAGS += --entry=__start + else ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y) CC = ccarm CXX = cxarm @@ -259,6 +263,8 @@ else ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y) GMEMFILE = gmemfile OBJDUMP = gdump + LDFLAGS += -entry=__start + # Default toolchain else @@ -296,6 +302,8 @@ else endif endif + LDFLAGS += --entry=__start + endif ifeq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)