Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

objtool/klp: Remove .llvm suffix in demangle_name()

Remove .llvm suffix, so that we can correlate foo.llvm.<hash 1> and
foo.llvm.<hash 2>.

Signed-off-by: Song Liu <song@kernel.org>
Link: https://patch.msgid.link/20260305231531.3847295-6-song@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>

authored by

Song Liu and committed by
Josh Poimboeuf
020b71dc 82062777

+8
+8
tools/objtool/elf.c
··· 455 455 static ssize_t demangled_name_len(const char *name) 456 456 { 457 457 ssize_t idx; 458 + const char *p; 459 + 460 + p = strstr(name, ".llvm."); 461 + if (p) 462 + return p - name; 458 463 459 464 if (!strstarts(name, "__UNIQUE_ID_") && !strchr(name, '.')) 460 465 return strlen(name); ··· 487 482 * __UNIQUE_ID_addressable___UNIQUE_ID_pci_invalid_bar_694_695 488 483 * 489 484 * to remove both trailing numbers, also remove trailing '_'. 485 + * 486 + * For symbols with llvm suffix, i.e., foo.llvm.<hash>, remove the 487 + * .llvm.<hash> part. 490 488 */ 491 489 static const char *demangle_name(struct symbol *sym) 492 490 {