From 643a1f736d2e57c577458d0e4d2948718d90b301 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 25 Sep 2022 13:55:04 -0700 Subject: [PATCH] altos: Use -ffunction-sections -fdata-sections This allows the linker to discard unused functions. Signed-off-by: Keith Packard --- src/Makefile.defs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile.defs b/src/Makefile.defs index d9b71997..f9387b07 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -23,6 +23,7 @@ OPT=-Os -Wl,-Map=$(PROGNAME)-$(VERSION).map PICOLIBC_CFLAGS= \ -specs=picolibc.specs \ + -Wl,--gc-sections -ffunction-sections -fdata-sections \ $(PICOLIBC_PRINTF_CFLAGS) AO_CFLAGS=\ -- 2.30.2