[PATCH] kbuild: Use --force-group-allocation when linking modules

Nathan Chancellor nathan at kernel.org
Mon Jun 29 18:54:32 PDT 2026


On Fri, 12 Jun 2026 15:31:37 +0200, Petr Pavlu <petr.pavlu at suse.com> wrote:
> Specific code, such as outlined KASAN checks, may be placed in
> COMDAT-deduplicated sections. When linking modules as relocatable files,
> the linker by default preserves such groups, potentially leaving multiple
> copies in the resulting modules and unnecessary group metadata.
> 
> Use --force-group-allocation to have the linker resolve the COMDAT groups
> and place their members as regular sections. The option is available from
> ld.bfd 2.29 and ld.lld 19.1.0.
> 
> [...]

Reviewed-by: Nathan Chancellor <nathan at kernel.org>

-- 
Cheers,
Nathan




More information about the linux-arm-kernel mailing list