+Index: gcc-4.8/src/gcc/config/mips/gnu-user.h
+===================================================================
+--- gcc-4.8.orig/src/gcc/config/mips/gnu-user.h	2013-01-11 04:38:27.000000000 +0800
++++ gcc-4.8/src/gcc/config/mips/gnu-user.h	2013-09-07 19:47:25.746728017 +0800
+@@ -56,6 +56,7 @@
+ #undef GNU_USER_TARGET_LINK_SPEC
+ #define GNU_USER_TARGET_LINK_SPEC \
+  "%(endian_spec) \
++ -as-needed \
+   %{shared:-shared} \
+   %{!shared: \
+     %{!static: \
+Index: gcc-4.8/src/gcc/config/mips/gnu-user64.h
+===================================================================
+--- gcc-4.8.orig/src/gcc/config/mips/gnu-user64.h	2013-01-11 04:38:27.000000000 +0800
++++ gcc-4.8/src/gcc/config/mips/gnu-user64.h	2013-09-07 19:46:52.430728335 +0800
+@@ -34,6 +34,7 @@
+ #define GNU_USER_TARGET_LINK_SPEC "\
+ %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
+ %{shared} \
++ -as-needed \
+  %(endian_spec) \
+   %{!shared: \
+     %{!static: \
