Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kbuild: exclude .rodata.(cst|str)* when building ranges

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>

authored by

Kris Van Hees and committed by
Masahiro Yamada
87bb368d eb47ee01

+5
+5
scripts/generate_builtin_ranges.awk
··· 282 282 # section. 283 283 # 284 284 ARGIND == 2 && sect && NF == 4 && /^ [^ \*]/ && !($1 in sect_addend) { 285 + # There are a few sections with constant data (without symbols) that 286 + # can get resized during linking, so it is best to ignore them. 287 + if ($1 ~ /^\.rodata\.(cst|str)[0-9]/) 288 + next; 289 + 285 290 if (!($1 in sect_base)) { 286 291 sect_base[$1] = base; 287 292