Strip symbols from binary file in non-debug make
This commit is contained in:
2
Makefile
2
Makefile
@@ -18,6 +18,7 @@ ASSEMBLER_FLAGS := -f elf64
|
|||||||
ASSEMBLER_FLAGS_D := -f elf64 -g -F dwarf
|
ASSEMBLER_FLAGS_D := -f elf64 -g -F dwarf
|
||||||
LINKER := ld
|
LINKER := ld
|
||||||
LINKER_FLAGS := -no-pie -z noexecstack -Ox
|
LINKER_FLAGS := -no-pie -z noexecstack -Ox
|
||||||
|
STRIP := strip -s
|
||||||
|
|
||||||
.PHONY: all clean debug
|
.PHONY: all clean debug
|
||||||
|
|
||||||
@@ -26,6 +27,7 @@ all: $(DIR_BIN)/tests
|
|||||||
$(DIR_BIN)/tests: $(OBJS)
|
$(DIR_BIN)/tests: $(OBJS)
|
||||||
@mkdir -p $(DIR_BIN)
|
@mkdir -p $(DIR_BIN)
|
||||||
$(LINKER) $^ -o $@ $(LINKER_FLAGS)
|
$(LINKER) $^ -o $@ $(LINKER_FLAGS)
|
||||||
|
$(STRIP) $@
|
||||||
ln -sf $@ tests
|
ln -sf $@ tests
|
||||||
$(DIR_BLD)/%.o: $(DIR_SRC)/%.asm
|
$(DIR_BLD)/%.o: $(DIR_SRC)/%.asm
|
||||||
@mkdir -p $(DIR_BLD)
|
@mkdir -p $(DIR_BLD)
|
||||||
|
Reference in New Issue
Block a user