Add -fdata-sections in memory.sh too
diff --git a/scripts/memory.sh b/scripts/memory.sh
index eefe102..4b02a72 100755
--- a/scripts/memory.sh
+++ b/scripts/memory.sh
@@ -12,7 +12,7 @@
 
 CLIENT='mini_client'
 
-CFLAGS_EXEC='-fno-asynchronous-unwind-tables -Wl,--gc-section -ffunction-sections'
+CFLAGS_EXEC='-fno-asynchronous-unwind-tables -Wl,--gc-section -ffunction-sections -fdata-sections'
 CFLAGS_MEM=-g3
 
 if [ -r $CONFIG_H ]; then :; else