From: Keith Packard Date: Sun, 25 Sep 2022 20:55:04 +0000 (-0700) Subject: altos: Use --gc-sections X-Git-Tag: 1.9.13~1^2~26^2~54^2~7 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=3a7ae9e964c9554a667a09d6b437fef136bc0fa0 altos: Use --gc-sections This allows the linker to discard unused functions. Don't use -ffunctions-sections and -fdata-sections as that eliminates several optimization opportunities and increases code size. Signed-off-by: Keith Packard --- diff --git a/src/Makefile.defs b/src/Makefile.defs index d9b71997..c2d5247c 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 \ $(PICOLIBC_PRINTF_CFLAGS) AO_CFLAGS=\