Skip to content

Commit

Permalink
UBUNTU: SAUCE: scripts/Makefile.modinst discard-locals from modules
Browse files Browse the repository at this point in the history
On riscv, it appears that all kernel modules are generated with an
excesive amount of local symbols and assembly automatic generated
symbols increasing the size of stripped .ko modules multiple times
over similar ones on other architectures. When stripping .ko on riscv,
discard these local symbols too, which should make our module sizes
somewhat more reasonable.

BugLink: https://bugs.launchpad.net/bugs/1964335

Signed-off-by: Andy Whitcroft <[email protected]>
Signed-off-by: Dimitri John Ledkov <[email protected]>
Acked-by: Andrea Righi <[email protected]>
Signed-off-by: Emil Renner Berthing <[email protected]>
  • Loading branch information
xnox authored and esmil committed Sep 24, 2024
1 parent f53cf31 commit 012d4c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/Makefile.modinst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ quiet_cmd_install = INSTALL $@
ifdef INSTALL_MOD_STRIP

ifeq ($(INSTALL_MOD_STRIP),1)
ifeq ($(ARCH),riscv)
strip-option := --strip-debug --discard-locals
else
strip-option := --strip-debug
endif
else
strip-option := $(INSTALL_MOD_STRIP)
endif
Expand Down

0 comments on commit 012d4c9

Please sign in to comment.