[generic] enable EFI partition support by default, adds ca. 8K uncompressed on ar71xx...
[openwrt.git] / scripts / strip-kmod.sh
index 68da9e9..789364f 100755 (executable)
@@ -11,16 +11,23 @@ MODULE="$1"
        exit 1
 }
 
+ARGS=
+[ -n "$KEEP_SYMBOLS" ] || ARGS="-x -G __this_module --strip-unneeded"
+
 ${CROSS}objcopy \
-       --strip-unneeded \
        -R .comment \
        -R .pdr \
        -R .mdebug.abi32 \
        -R .note.gnu.build-id \
        -R .gnu.attributes \
        -R .reginfo \
-       -G __this_module \
-       -x "$MODULE" "$MODULE.tmp"
+       $ARGS \
+       "$MODULE" "$MODULE.tmp"
+
+[ -n "$NO_RENAME" ] && {
+       mv "${MODULE}.tmp" "$MODULE"
+       exit 0
+}
 
 ${CROSS}nm "$MODULE.tmp" | awk '
 BEGIN {
This page took 0.023608 seconds and 4 git commands to generate.