Skip to content

Commit

Permalink
kbuild: lto: add _mcount to list of used symbols
Browse files Browse the repository at this point in the history
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.

Fixes: fbe078d ("kbuild: lto: add a default list of used symbols")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
arndb authored and masahir0y committed Feb 27, 2021
1 parent 3fb6d0e commit da83616
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/lto-used-symbollist.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
memcpy
memmove
memset
_mcount
__stack_chk_fail
__stack_chk_guard

0 comments on commit da83616

Please sign in to comment.