kbuild: lto: add _mcount to list of used symbols
PATCH 1/1 kbuild: lto: add _mcount to list of used symbols
From: Arnd Bergmann <[email protected]>
Some randconfig builds fail with undefined references to _mcount when CONFIG_TRIM_UNUSED_KSYMS is set:
ERROR: modpost: "_mcount" [drivers/tee/optee/optee.ko] undefined!
ERROR: modpost: "_mcount" [drivers/fsi/fsi-occ.ko] undefined!
ERROR: modpost: "_mcount" [drivers/fpga/dfl-pci.ko] undefined!
Since there is already a list of symbols that get generated at link time, add this one as well.
--- scripts/lto-used-symbollist.txt | 1 + 1 file changed, 1 insertion(+)
scripts/lto-used-symbollist.txt +1 -0
@@ -1,5 +1,6 @@ memcpy memmove memset +_mcount __stack_chk_fail __stack_chk_guard
Signature · 1 line
2.29.2
Quoted 31 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Some randconfig builds fail with undefined references to
_mcountwhenCONFIG_TRIM_UNUSED_KSYMSis set:ERROR: modpost: "
_mcount" [drivers/tee/optee/optee.ko] undefined!
ERROR: modpost: "_mcount" [drivers/fsi/fsi-occ.ko] undefined!
ERROR: modpost: "_mcount" [drivers/fpga/dfl-pci.ko] undefined!Since there is already a list of symbols that get generated at link time, add this one as well.
Fixes fbe078d397b4 ("kbuild: lto: add a default list of used symbols")Signed-off-by Arnd Bergmann <[email protected]>--- scripts/lto-used-symbollist.txt | 1 + 1 file changed, 1 insertion(+)scripts/lto-used-symbollist.txt +1
-1@@ -1,5 +1,6 @@ memcpy memmove memset +_mcount __stack_chk_fail __stack_chk_guard --
Quoted 2 lines
2.29.2
Applied to linux-kbuild/fixes. Thanks.
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 9 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Some randconfig builds fail with undefined references to
_mcountwhenCONFIG_TRIM_UNUSED_KSYMSis set:ERROR: modpost: "
_mcount" [drivers/tee/optee/optee.ko] undefined!
ERROR: modpost: "_mcount" [drivers/fsi/fsi-occ.ko] undefined!
ERROR: modpost: "_mcount" [drivers/fpga/dfl-pci.ko] undefined!
Quoted 5 lines
Since there is already a list of symbols that get generated at link time, add this one as well.
Fixes fbe078d397b4 ("kbuild: lto: add a default list of used symbols")Signed-off-by Arnd Bergmann <[email protected]>
Thanks!
Signature · 1 line
Kees Cook