Use link-time garbage collection in memory.sh
diff --git a/scripts/memory.sh b/scripts/memory.sh
index 792d27f..eefe102 100755
--- a/scripts/memory.sh
+++ b/scripts/memory.sh
@@ -12,7 +12,7 @@
 
 CLIENT='mini_client'
 
-CFLAGS_EXEC=-fno-asynchronous-unwind-tables
+CFLAGS_EXEC='-fno-asynchronous-unwind-tables -Wl,--gc-section -ffunction-sections'
 CFLAGS_MEM=-g3
 
 if [ -r $CONFIG_H ]; then :; else