[PATCH v3 01/20] kbuild: do not allocate .modinfo in vmlinux

Lorenzo Stoakes (ARM) ljs at kernel.org
Thu Sep 17 10:39:18 PDT 2026


On Thu, Sep 17, 2026 at 10:05:34AM -0700, Kees Cook wrote:
> On Thu, Sep 17, 2026 at 05:06:11PM +0100, Lorenzo Stoakes (ARM) wrote:
> > +      cmd_modules_builtin_modinfo = $(OBJCOPY) -O binary -j .modinfo --dump-section .modinfo=$@ $< $@.tmp; \
> > +                                    rm -f $@.tmp; \
> > +                                    sed -i 's/\x00\+$$/\x00/g' $@
>
> Oh, I just noticed this. I don't think the .tmp is needed. You can just
> use /dev/null for the outfile here: no need to write anything unused to
> disk; seems to work for binutils and llvm's objcopy.

Ack will fix up thanks!

>
> --
> Kees Cook

--
Cheers, Lorenzo



More information about the linux-riscv mailing list