]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blobdiff - kernel/kallsyms.c
kallsyms: strip LTO-only suffixes from promoted global functions
[mirror_ubuntu-kernels.git] / kernel / kallsyms.c
index 7982cc9d497cd6ed715fcb18f1db7ccbbd35d7b5..016d997131d4330a002f3ebc58e2801f6af5f980 100644 (file)
@@ -174,11 +174,10 @@ static bool cleanup_symbol_name(char *s)
         * LLVM appends various suffixes for local functions and variables that
         * must be promoted to global scope as part of LTO.  This can break
         * hooking of static functions with kprobes. '.' is not a valid
-        * character in an identifier in C. Suffixes observed:
+        * character in an identifier in C. Suffixes only in LLVM LTO observed:
         * - foo.llvm.[0-9a-f]+
-        * - foo.[0-9a-f]+
         */
-       res = strchr(s, '.');
+       res = strstr(s, ".llvm.");
        if (res) {
                *res = '\0';
                return true;