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 <gavin.liu@mediatek.com>
This commit is contained in:
Gavin Liu 2025-02-05 09:47:54 +08:00 committed by Gavin Liu
parent 0c370e2d59
commit 8f7d9bfa0a

View file

@ -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 \