diff options
| author | Petr Pavlu <petr.pavlu@suse.com> | 2026-06-12 15:31:37 +0200 |
|---|---|---|
| committer | Nicolas Schier <nsc@kernel.org> | 2026-07-06 08:03:13 +0200 |
| commit | 547476297ba5e874ff485263d90b794a6b67fb7a (patch) | |
| tree | 43a4e54ccdf8bf76baa41ffbf45ff9fa12c473cf /scripts/basic | |
| parent | dc59e4fea9d83f03bad6bddf3fa2e52491777482 (diff) | |
| download | linux-547476297ba5e874ff485263d90b794a6b67fb7a.tar.gz linux-547476297ba5e874ff485263d90b794a6b67fb7a.zip | |
kbuild: Use --force-group-allocation when linking modules
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.
Remove the workaround in arch/arm64/include/asm/module.lds.h that was added
for the same problem but limited to CONFIG_KASAN_SW_TAGS and .text.hot.
Note that this code currently has no effect anyway because all .text.hot
sections are placed in the .text output section by scripts/module.lds.S,
since commit 1ba9f8979426 ("vmlinux.lds: Unify TEXT_MAIN, DATA_MAIN, and
related macros").
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Reviewed-by: Peter Collingbourne <pcc@google.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20260612133139.1919042-1-petr.pavlu@suse.com
[nsc: Updated patch context in arch/arm64/include/asm/module.lds.h]
Signed-off-by: Nicolas Schier <nsc@kernel.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
