x86: use gc sections to reduce image size

Follow the discussion of Charles Manning and Mike Frysinger.
Using gc_sections helps reduce image size.
diff --git a/arch/i386/config.mk b/arch/i386/config.mk
index 4b990e0..0e80a1a 100644
--- a/arch/i386/config.mk
+++ b/arch/i386/config.mk
@@ -26,3 +26,6 @@
 STANDALONE_LOAD_ADDR = 0x40000
 
 PLATFORM_CPPFLAGS += -DCONFIG_I386 -D__I386__
+
+LDFLAGS += --cref --gc-sections
+PLATFORM_RELFLAGS += -ffunction-sections