Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4596eee0 authored by Sami Tolvanen's avatar Sami Tolvanen
Browse files

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: default avatarSami Tolvanen <samitolvanen@google.com>
parent 99e4db37
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -280,6 +280,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';