imx6: switch to v4.1
[openwrt.git] / scripts / strip-kmod.sh
index 13e6b58..e3f13be 100755 (executable)
@@ -18,11 +18,14 @@ else
        ARGS="-x -G __this_module --strip-unneeded"
 fi
 
+if [ -z "$KEEP_BUILD_ID" ]; then
+    ARGS="$ARGS -R .note.gnu.build-id"
+fi
+
 ${CROSS}objcopy \
        -R .comment \
        -R .pdr \
        -R .mdebug.abi32 \
-       -R .note.gnu.build-id \
        -R .gnu.attributes \
        -R .reginfo \
        $ARGS \