]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf symbol-elf: Avoid a weak cxx_demangle_sym function
authorIan Rogers <irogers@google.com>
Tue, 19 Nov 2024 03:17:54 +0000 (19:17 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 10 Jan 2025 13:59:42 +0000 (10:59 -0300)
commit368781025a1133d7f9550358ba421994118608f7
tree5d1877d095e154c03838c9e60914606d5f6ef120
parent4f90ed0ae36ac2c223d312a2cd767714196b1455
perf symbol-elf: Avoid a weak cxx_demangle_sym function

cxx_demangle_sym is weak in case demangle-cxx.c replaces the
definition in symbol-elf.c. When demangle-cxx.c is built
HAVE_CXA_DEMANGLE_SUPPORT is defined, as such the define can be used
to avoid a weak symbol.

As weak symbols are outside of the C standard their use can lead to
strange behaviors, in particular with LTO, as well as causing issues to
be hidden at link time.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20241119031754.1021858-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/symbol-elf.c