]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kbuild: exclude .rodata.(cst|str)* when building ranges
authorKris Van Hees <kris.van.hees@oracle.com>
Fri, 7 Mar 2025 16:53:28 +0000 (11:53 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Apr 2025 08:18:11 +0000 (10:18 +0200)
commitb849b0b8f8ae12c78ec96b5ef4e42d973aa0bbc5
tree10cd88140abe7d0333dcdc1fffbd7c705db52565
parentc98eb9ffb1d9c98237b5e1668eee17654e129fb0
kbuild: exclude .rodata.(cst|str)* when building ranges

commit 87bb368d0637c466a8a77433837056f981d01991 upstream.

The .rodata.(cst|str)* sections are often resized during the final
linking and since these sections do not cover actual symbols there is
no need to include them in the modules.builtin.ranges data.

When these sections were included in processing and resizing occurred,
modules were reported with ranges that extended beyond their true end,
causing subsequent symbols (in address order) to be associated with
the wrong module.

Fixes: 5f5e7344322f ("kbuild: generate offset range data for builtin modules")
Cc: stable@vger.kernel.org
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scripts/generate_builtin_ranges.awk