lkml.org 
[lkml]   [2021]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] kbuild: lto: add _mcount to list of used symbols
Date
From: Arnd Bergmann <arnd@arndb.de>

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: fbe078d397b4 ("kbuild: lto: add a default list of used symbols")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
scripts/lto-used-symbollist.txt | 1 +
1 file changed, 1 insertion(+)

diff --git a/scripts/lto-used-symbollist.txt b/scripts/lto-used-symbollist.txt
index 38e7bb9ebaae..406ada65e926 100644
--- a/scripts/lto-used-symbollist.txt
+++ b/scripts/lto-used-symbollist.txt
@@ -1,5 +1,6 @@
memcpy
memmove
memset
+_mcount
__stack_chk_fail
__stack_chk_guard
--
2.29.2
\
 
 \ /
  Last update: 2021-02-25 15:36    [W:0.031 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site