From 49093b1400a5ffce3884f37b27e94cff16e46003 Mon Sep 17 00:00:00 2001 From: yinshengkai Date: Mon, 18 Sep 2023 15:45:53 +0800 Subject: [PATCH] sim: fix text-segment not taking effect Signed-off-by: yinshengkai --- boards/sim/sim/sim/scripts/Make.defs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/boards/sim/sim/sim/scripts/Make.defs b/boards/sim/sim/sim/scripts/Make.defs index f5a8f739912..37f3810376e 100644 --- a/boards/sim/sim/sim/scripts/Make.defs +++ b/boards/sim/sim/sim/scripts/Make.defs @@ -260,6 +260,10 @@ ifeq ($(CONFIG_HOST_MACOS),y) LDFLAGS += -Wl,-dead_strip else LDFLAGS += -Wl,--gc-sections + + # Let the symbol table link from 0x400000 + # which is more convenient for debugging. + LDFLAGS += -Wl,-Ttext-segment=0x400000 endif ifeq ($(CONFIG_SIM_M32),y) @@ -268,10 +272,3 @@ ifeq ($(CONFIG_SIM_M32),y) LDMODULEFLAGS += -melf_i386 LDELFFLAGS += -melf_i386 endif - -# Let the symbol table link from 0x400000 -# which is more convenient for debugging. - -ifeq ($(CONFIG_HOST_MACOS),n) - LDFLAGS += -Wl,-Ttext-segment=0x400000 -endif