From 3129b7a4659dfd2c8e82b9b3ff596a1e9d6976d2 Mon Sep 17 00:00:00 2001 From: Huang Qi Date: Fri, 18 Aug 2023 16:48:37 +0800 Subject: [PATCH] tools: Emit map file for wasm module Emit map file like NuttX's `System.map` for more debug information. Signed-off-by: Huang Qi --- tools/Wasm.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/Wasm.mk b/tools/Wasm.mk index e112dc01e..c571f881e 100644 --- a/tools/Wasm.mk +++ b/tools/Wasm.mk @@ -87,6 +87,7 @@ define LINK_WASM $(eval STACKSIZE=$(shell echo $(notdir $(bin)) | cut -d'#' -f3)) \ $(eval PROGNAME=$(shell echo $(notdir $(bin)) | cut -d'#' -f1)) \ $(eval RETVAL=$(shell $(WCC) $(bin) $(WBIN) $(WCFLAGS) $(WLDFLAGS) $(COMPILER_RT_LIB) \ + -Wl,--Map=$(APPDIR)$(DELIM)wasm$(DELIM)$(PROGNAME).map \ -o $(APPDIR)$(DELIM)wasm$(DELIM)$(PROGNAME).wasm || echo 1;)) \ $(if $(RETVAL), \ $(error wasm build failed for $(PROGNAME).wasm) \