kernel build:avoid multiple definition ld script

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao
2025-02-10 17:55:31 +08:00
committed by Xiang Xiao
parent 61551aa849
commit 21a6a13698

View File

@@ -98,4 +98,9 @@ ifeq ($(CONFIG_BINFMT_ELF_RELOCATABLE),y)
LDELFFLAGS += -r LDELFFLAGS += -r
endif endif
LDELFFLAGS += -e __start -Bstatic LDELFFLAGS += -e __start -Bstatic
# Remove other ld scripts, just use import ld scripts
#
LDFILE := $(filter -T %.ld, $(LDELFFLAGS))
LDELFFLAGS := $(filter-out $(LDFILE), $(LDELFFLAGS))
LDELFFLAGS += $(addprefix -T,$(call CONVERT_PATH,$(TOPDIR)/scripts/gnu-elf.ld)) LDELFFLAGS += $(addprefix -T,$(call CONVERT_PATH,$(TOPDIR)/scripts/gnu-elf.ld))