Re: [PATCH] kbuild: Use --force-group-allocation when linking modules
From: Nathan Chancellor
Date: Mon Jun 29 2026 - 21:56:30 EST
On Fri, 12 Jun 2026 15:31:37 +0200, Petr Pavlu <petr.pavlu@xxxxxxxx> 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@xxxxxxxxxx>
--
Cheers,
Nathan