APPLIED: [linux-riscv][J][PATCH] UBUNTU: SAUCE: scripts/Makefile.modinst discard-locals from modules

Dimitri John Ledkov dimitri.ledkov at canonical.com
Mon Mar 14 11:31:43 UTC 2022


Applied.
-- 
Regards,

Dimitri.

On Wed, 9 Mar 2022 at 16:19, Andrea Righi <andrea.righi at canonical.com> wrote:
>
> On Wed, Mar 09, 2022 at 04:16:22PM +0000, Dimitri John Ledkov wrote:
> > 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 <apw at canonical.com>
> > Signed-off-by: Dimitri John Ledkov <dimitri.ledkov at canonical.com>
>
> Looks good to me! Also thanks for testing this out!
>
> Acked-by: Andrea Righi <andrea.righi at canonical.com>
>
> > ---
> >
> >  This makes kernel install 863MB smaller, and everything appears to
> >  work fine. I.e. loaded btrfs module, mounted btrfs filesystem,
> >  unmounted it, etc.
> >
> >  scripts/Makefile.modinst | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
> > index ff9b09e4cf..373d6953ad 100644
> > --- a/scripts/Makefile.modinst
> > +++ b/scripts/Makefile.modinst
> > @@ -46,7 +46,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
> > --
> > 2.32.0
> >
> >
> > --
> > kernel-team mailing list
> > kernel-team at lists.ubuntu.com
> > https://lists.ubuntu.com/mailman/listinfo/kernel-team



More information about the kernel-team mailing list