mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
ANDROID: kallsyms: strip hashes from function names with ThinLTO
With CONFIG_THINLTO and CFI both enabled, LLVM appends a hash to the names of all static functions. This breaks userspace tools, so strip out the hash from output. Bug: 147422318 Change-Id: Ibea6be089d530e92dcd191481cb02549041203f6 Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This commit is contained in:
parent
98c326e94f
commit
75f80b3632
@ -314,6 +314,12 @@ static inline void cleanup_symbol_name(char *s)
|
||||
{
|
||||
char *res;
|
||||
|
||||
#ifdef CONFIG_THINLTO
|
||||
/* Filter out hashes from static functions */
|
||||
res = strrchr(s, '$');
|
||||
if (res)
|
||||
*res = '\0';
|
||||
#endif
|
||||
res = strrchr(s, '.');
|
||||
if (res && !strcmp(res, ".cfi"))
|
||||
*res = '\0';
|
||||
|
Loading…
x
Reference in New Issue
Block a user