arm/Toolchain.defs: skip -r for ELF_EXECUTABLE

This avoids using `-r` option when linking executable programs.

Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
This commit is contained in:
Yanfeng Liu 2025-01-09 08:37:42 +08:00 committed by Xiang Xiao
parent 657247bda8
commit 48846954d8

View file

@ -546,7 +546,9 @@ ifeq ($(CONFIG_PIC),y)
# Generate an executable elf, need to ignore undefined symbols
LDELFFLAGS += --unresolved-symbols=ignore-in-object-files --emit-relocs
else
LDELFFLAGS += -r
ifneq ($(CONFIG_BINFMT_ELF_EXECUTABLE),y)
LDELFFLAGS += -r
endif
endif
LDELFFLAGS += -e main -T $(call CONVERT_PATH,$(TOPDIR)$(DELIM)libs$(DELIM)libc$(DELIM)modlib$(DELIM)gnu-elf.ld)