From d386aa574422b7be9079173ce233f0bd9488b85a Mon Sep 17 00:00:00 2001 From: Kwarde Date: Sat, 2 Aug 2025 14:48:13 +0200 Subject: [PATCH] Strip symbols from binary file in non-debug make --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 1ad7fca..80e0faf 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ ASSEMBLER_FLAGS := -f elf64 ASSEMBLER_FLAGS_D := -f elf64 -g -F dwarf LINKER := ld LINKER_FLAGS := -no-pie -z noexecstack -Ox +STRIP := strip -s .PHONY: all clean debug @@ -26,6 +27,7 @@ all: $(DIR_BIN)/tests $(DIR_BIN)/tests: $(OBJS) @mkdir -p $(DIR_BIN) $(LINKER) $^ -o $@ $(LINKER_FLAGS) + $(STRIP) $@ ln -sf $@ tests $(DIR_BLD)/%.o: $(DIR_SRC)/%.asm @mkdir -p $(DIR_BLD)