X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=scripts%2Fstrip-kmod.sh;h=313015b909af6957d8b24f36b489c5b1c7e11974;hb=85a35c1ace460528c07017ee543b9bcc1f627c76;hp=13e6b58007f92fa870afcb58da9ac88df7957c19;hpb=614c6eee5227e1ecb75bc3bac0e163d0bfcfe621;p=openwrt.git diff --git a/scripts/strip-kmod.sh b/scripts/strip-kmod.sh index 13e6b58007..313015b909 100755 --- a/scripts/strip-kmod.sh +++ b/scripts/strip-kmod.sh @@ -18,13 +18,18 @@ 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 \ + -R .MIPS.abiflags \ + -R .note.GNU-stack \ $ARGS \ "$MODULE" "$MODULE.tmp"