From: sashiko-bot@kernel.org
To: "Ian Rogers" <irogers@google.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 2/9] perf symbol: Fix the build when demangling with libbfd
Date: Wed, 16 Sep 2026 06:21:46 +0000 [thread overview]
Message-ID: <20260916062147.4CC4F1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260916061218.3061216-3-irogers@google.com>
> cxx_demangle_sym() calls bfd_demangle() with the DMGL_PARAMS and
> DMGL_ANSI flags, but nothing declares them. The
> "#define PACKAGE 'perf'", "#include <bfd.h>" and the DMGL_ definitions
> were left behind in symbol-elf.c when the demangling code moved to
> symbol.c, and libiberty's demangle.h that defines the flags isn't
> installed by every binutils package. The cplus_demangle() variant is
> missing a declaration for the same reason.
>
> The code is only built when the C++ ABI's __cxa_demangle() is
> unavailable, so most builds never compile it:
>
> $ make BUILD_NONDISTRO=1 NO_DEMANGLE=1
> util/symbol.c:2714: error: 'DMGL_PARAMS' undeclared
> util/symbol.c:2714: error: 'DMGL_ANSI' undeclared
> util/symbol.c:2716: error: implicit declaration of 'bfd_demangle'
>
> Move the libbfd demangling into libbfd.c, which already includes bfd.h,
> and declare in symbol.c the libiberty interfaces the cplus_demangle()
> variant needs.
>
> Fixes: 4d9b5146f0d9 ("perf symbol: Move demangling code out of symbol-elf.c")
> Signed-off-by: Ian Rogers <irogers@google.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260916061218.3061216-1-irogers@google.com?part=2
next prev parent reply other threads:[~2026-09-16 6:21 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 6:12 [PATCH 0/9] perf build: Fix builds with clang and BUILD_NONDISTRO Ian Rogers
2026-09-16 6:12 ` [PATCH 1/9] perf libbfd: Fix the clang -Wthread-safety build failure Ian Rogers
2026-09-16 6:18 ` sashiko-bot
2026-09-16 6:12 ` [PATCH 2/9] perf symbol: Fix the build when demangling with libbfd Ian Rogers
2026-09-16 6:21 ` sashiko-bot [this message]
2026-09-16 6:12 ` [PATCH 3/9] perf libbfd: Include the headers that are used Ian Rogers
2026-09-16 6:22 ` sashiko-bot
2026-09-16 15:54 ` Ian Rogers
2026-09-16 17:37 ` Namhyung Kim
2026-09-16 6:12 ` [PATCH 4/9] perf pmu: " Ian Rogers
2026-09-16 6:14 ` sashiko-bot
2026-09-16 6:12 ` [PATCH 5/9] perf build: Only pass clang flags to CXX when CXX is clang Ian Rogers
2026-09-16 6:17 ` sashiko-bot
2026-09-16 6:12 ` [PATCH 6/9] perf build: Use the given CC rather than clang in clang builds Ian Rogers
2026-09-16 6:19 ` sashiko-bot
2026-09-16 6:12 ` [PATCH 7/9] perf build: Check the version of the compiler that is used Ian Rogers
2026-09-16 6:16 ` sashiko-bot
2026-09-16 6:12 ` [PATCH 8/9] perf build: Remove leftovers of removed build options Ian Rogers
2026-09-16 6:17 ` sashiko-bot
2026-09-16 6:12 ` [PATCH 9/9] perf test: Add build tests for clang and libbfd demangling Ian Rogers
2026-09-16 6:22 ` sashiko-bot
2026-09-16 17:35 ` [PATCH 0/9] perf build: Fix builds with clang and BUILD_NONDISTRO Namhyung Kim
2026-09-22 12:47 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260916062147.4CC4F1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=irogers@google.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox