[build/device] Add a comment about gc-sections

This commit is contained in:
Romain Goyet
2019-10-01 16:35:12 +02:00
committed by Ecco
parent 1cf0bfbea9
commit cb2557c988

View File

@@ -20,12 +20,12 @@ endif
ifeq ($(LTO),1)
# Use link-time optimization if LTO=1
SFLAGS += -flto -Wl,--gc-sections
else
# Otherwise, just get rid of unused symbols
LDFLAGS += -Wl,--gc-sections
SFLAGS += -flto
endif
# Get rid of unused symbols. This is also useful even if LTO=1.
LDFLAGS += -Wl,--gc-sections
LDFLAGS += $(SFLAGS) -lgcc -Wl,-T,$(LDSCRIPT)
# To debug linker scripts, add the following line