Commit 05963491 authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf symbols: Record whether a symbol is an alias for an IFUNC symbol

To assist with synthesizing plt symbols for IFUNCs, record whether a
symbol is an alias of an IFUNC symbol.
Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20230131131625.6964-5-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 78250284
...@@ -201,10 +201,14 @@ void symbols__fixup_duplicate(struct rb_root_cached *symbols) ...@@ -201,10 +201,14 @@ void symbols__fixup_duplicate(struct rb_root_cached *symbols)
continue; continue;
if (choose_best_symbol(curr, next) == SYMBOL_A) { if (choose_best_symbol(curr, next) == SYMBOL_A) {
if (next->type == STT_GNU_IFUNC)
curr->ifunc_alias = true;
rb_erase_cached(&next->rb_node, symbols); rb_erase_cached(&next->rb_node, symbols);
symbol__delete(next); symbol__delete(next);
goto again; goto again;
} else { } else {
if (curr->type == STT_GNU_IFUNC)
next->ifunc_alias = true;
nd = rb_next(&curr->rb_node); nd = rb_next(&curr->rb_node);
rb_erase_cached(&curr->rb_node, symbols); rb_erase_cached(&curr->rb_node, symbols);
symbol__delete(curr); symbol__delete(curr);
......
...@@ -64,6 +64,8 @@ struct symbol { ...@@ -64,6 +64,8 @@ struct symbol {
u8 inlined:1; u8 inlined:1;
/** Has symbol__annotate2 been performed. */ /** Has symbol__annotate2 been performed. */
u8 annotate2:1; u8 annotate2:1;
/** Symbol is an alias of an STT_GNU_IFUNC */
u8 ifunc_alias:1;
/** Architecture specific. Unused except on PPC where it holds st_other. */ /** Architecture specific. Unused except on PPC where it holds st_other. */
u8 arch_sym; u8 arch_sym;
/** The name of length namelen associated with the symbol. */ /** The name of length namelen associated with the symbol. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment