Message ID | 20250122-strip_unneeded-v1-1-ac29a726cb41@rivosinc.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | kbuild: Use --strip-unneeded with INSTALL_MOD_STRIP | expand |
Context | Check | Description |
---|---|---|
conchuod/vmtest-for-next-PR | success | PR summary |
conchuod/patch-1-test-1 | success | .github/scripts/patches/tests/build_rv32_defconfig.sh took 120.18s |
conchuod/patch-1-test-2 | success | .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh took 1071.31s |
conchuod/patch-1-test-3 | success | .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh took 1307.00s |
conchuod/patch-1-test-4 | success | .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh took 20.65s |
conchuod/patch-1-test-5 | success | .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh took 22.21s |
conchuod/patch-1-test-6 | success | .github/scripts/patches/tests/checkpatch.sh took 0.42s |
conchuod/patch-1-test-7 | success | .github/scripts/patches/tests/dtb_warn_rv64.sh took 43.31s |
conchuod/patch-1-test-8 | success | .github/scripts/patches/tests/header_inline.sh took 0.01s |
conchuod/patch-1-test-9 | success | .github/scripts/patches/tests/kdoc.sh took 0.60s |
conchuod/patch-1-test-10 | success | .github/scripts/patches/tests/module_param.sh took 0.01s |
conchuod/patch-1-test-11 | success | .github/scripts/patches/tests/verify_fixes.sh took 0.00s |
conchuod/patch-1-test-12 | success | .github/scripts/patches/tests/verify_signedoff.sh took 0.06s |
bjorn/build-rv32-defconfig | success | build-rv32-defconfig |
bjorn/build-rv64-clang-allmodconfig | success | build-rv64-clang-allmodconfig |
bjorn/build-rv64-gcc-allmodconfig | success | build-rv64-gcc-allmodconfig |
bjorn/build-rv64-nommu-k210-defconfig | success | build-rv64-nommu-k210-defconfig |
bjorn/build-rv64-nommu-k210-virt | success | build-rv64-nommu-k210-virt |
bjorn/checkpatch | success | checkpatch |
bjorn/dtb-warn-rv64 | success | dtb-warn-rv64 |
bjorn/header-inline | success | header-inline |
bjorn/kdoc | success | kdoc |
bjorn/module-param | success | module-param |
bjorn/verify-fixes | success | verify-fixes |
bjorn/verify-signedoff | success | verify-signedoff |
diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst index f97c9926ed31b2b14601ff7773a2ea48b225628b..c22f35f6b9db3cac3923b9e787b219f752570642 100644 --- a/scripts/Makefile.modinst +++ b/scripts/Makefile.modinst @@ -80,7 +80,7 @@ quiet_cmd_install = INSTALL $@ ifdef INSTALL_MOD_STRIP ifeq ($(INSTALL_MOD_STRIP),1) -strip-option := --strip-debug +strip-option := --strip-unneeded else strip-option := $(INSTALL_MOD_STRIP) endif
On riscv, kernel modules end up with a significant number of local symbols. This becomes apparent when compiling modules with debug symbols enabled. Using amdgpu.ko as an example of a large module, on riscv the size is 754MB (no stripping), 53MB (--strip-debug), and 21MB (--strip-unneeded). ON x86, amdgpu.ko is 482MB (no stripping), 21MB (--strip-debug), and 20MB (--strip-unneeded). Use --strip-unneeded instead of --strip-debug to strip modules so decrease the size of the resulting modules. This is particularly relevant for riscv, but also marginally aids other architectures. Signed-off-by: Charlie Jenkins <charlie@rivosinc.com> --- scripts/Makefile.modinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- base-commit: ffd294d346d185b70e28b1a28abe367bbfe53c04 change-id: 20250122-strip_unneeded-cab729310056