Skip to content

Commit 3a7ae9e

Browse files
committed
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 <[email protected]>
1 parent 1523a98 commit 3a7ae9e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Makefile.defs

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ OPT=-Os -Wl,-Map=$(PROGNAME)-$(VERSION).map
2323

2424
PICOLIBC_CFLAGS= \
2525
-specs=picolibc.specs \
26+
-Wl,--gc-sections \
2627
$(PICOLIBC_PRINTF_CFLAGS)
2728

2829
AO_CFLAGS=\

0 commit comments

Comments
 (0)