From 8f7d9bfa0a15d3063f9475da9c5e579ea935ac68 Mon Sep 17 00:00:00 2001 From: Gavin Liu Date: Wed, 5 Feb 2025 09:47:54 +0800 Subject: [PATCH] fix(mt8196): add whole-archive option to prebuilt library Added `-Wl,--whole-archive` option to the LDLIBS in the platfrom.mk to ensure that the symbols within the library are not stripped during the linking process. Change-Id: I35c728d3ccc98489183285a96f703e02dc7505d3 Signed-off-by: Gavin Liu --- plat/mediatek/mt8196/platform.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plat/mediatek/mt8196/platform.mk b/plat/mediatek/mt8196/platform.mk index 50508093a..8eb1acede 100644 --- a/plat/mediatek/mt8196/platform.mk +++ b/plat/mediatek/mt8196/platform.mk @@ -62,7 +62,7 @@ MODULES-$(CONFIG_MTK_MTCMOS) += $(MTK_PLAT)/drivers/mtcmos ifneq ($(MTKLIB_PATH),) LDFLAGS += -L $(dir $(MTKLIB_PATH)) -LDLIBS += -l$(patsubst lib%.a,%,$(notdir $(MTKLIB_PATH))) +LDLIBS += -Wl,--whole-archive -l$(patsubst lib%.a,%,$(notdir $(MTKLIB_PATH))) -Wl,--no-whole-archive endif PLAT_BL_COMMON_SOURCES := common/desc_image_load.c \