@@ -857,17 +857,16 @@ int dso__load_sym(struct dso *dso, struct map *map,
* don't identify functions, so will confuse the profile
* output: */
if (ehdr.e_machine == EM_ARM) {
- if (!strcmp(elf_name, "$a") ||
- !strcmp(elf_name, "$d") ||
- !strcmp(elf_name, "$t"))
+ if (elf_name[0] == '$' && strchr("adt", elf_name[1])
+ && (elf_name[2] == '\0' || elf_name[2] == '.'))
continue;
}
/* Reject Aarch64 ELF "mapping symbols": these aren't unique and
* don't identify functions, so will confuse the profile
* output: */
if (ehdr.e_machine == EM_AARCH64) {
- if (!strcmp(elf_name, "$x") ||
- !strcmp(elf_name, "$d"))
+ if (elf_name[0] == '$' && strchr("dx", elf_name[1])
+ && (elf_name[2] == '\0' || elf_name[2] == '.'))
continue;
}