From: sashiko-bot@kernel.org
To: "Ian Rogers" <irogers@google.com>
Cc: bpf@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v2 2/7] perf build: Add build support and capability for elfutils libasm
Date: Tue, 09 Jun 2026 07:19:32 +0000 [thread overview]
Message-ID: <20260609071933.1F4B51F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260609070732.545416-3-irogers@google.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The LIBASM_DLOPEN build configuration is defined but completely lacks the corresponding C code to dynamically load the library.
- [Medium] Setting NO_LIBDW=1 fails to exclude libdw from the build, leading to unintended linkage and static build failures.
--
commit 2a3530a4ffc824890cb03d14fd777712b83cb02e
Author: Ian Rogers <irogers@google.com>
perf build: Add build support and capability for elfutils libasm
Configure perf build system to utilize the libasm feature check
(supporting both static and dynamic builds) and export the config flags.
Add "libasm" capability detection to perf check.
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 6e7b15fab2ecc..8527d20f498f8 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
[ ... ]
> @@ -432,6 +439,7 @@ ifeq ($(feature-file-handle), 1)
> endif
>
> ifdef NO_LIBELF
> + NO_LIBASM := 1
> NO_LIBDW := 1
> NO_LIBUNWIND := 1
> NO_LIBBPF := 1
[ ... ]
> @@ -1060,6 +1068,20 @@ ifndef NO_CAPSTONE
> endif
> endif
>
> +ifndef NO_LIBASM
> + $(call feature_check,libasm)
> + ifeq ($(feature-libasm), 1)
> + CFLAGS += -DHAVE_LIBASM_SUPPORT $(LIBASM_CFLAGS)
> + ifdef LIBASM_DLOPEN
> + CFLAGS += -DLIBASM_DLOPEN
[Severity: Medium]
Is there corresponding C code to handle the dlopen and dlsym wrappers for
libasm?
It looks like if LIBASM_DLOPEN is defined, the build skips linking libasm
directly. However, without the runtime dynamic loading implementation, won't
this result in unresolved symbol linker errors when trying to build with
LIBASM_DLOPEN=1?
> + else
> + LDFLAGS += $(LIBASM_LDFLAGS)
> + EXTLIBS += -lasm -ldw -lelf
[Severity: Medium]
If a user configures the build with NO_LIBDW=1 to avoid linking libdw, won't
this unconditional addition of -ldw override their request?
Setting NO_LIBDW=1 does not implicitly set NO_LIBASM=1. As a result, the
libasm feature check still executes and forcibly appends -ldw to EXTLIBS.
For static builds, will this cause linker errors since NO_LIBDW=1 skips adding
DWARFLIBS (like -lz and -lzstd) that libdw.a requires?
> + endif
> + $(call detected,CONFIG_LIBASM)
> + endif
> +endif
> +
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260609070732.545416-1-irogers@google.com?part=2
next prev parent reply other threads:[~2026-06-09 7:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 7:07 [PATCH v2 0/7] perf annotate: Add elfutils libasm disassembler support Ian Rogers
2026-06-09 7:07 ` [PATCH v2 1/7] tools build: Add feature check for elfutils libasm Ian Rogers
2026-06-09 7:21 ` sashiko-bot
2026-06-09 7:07 ` [PATCH v2 2/7] perf build: Add build support and capability " Ian Rogers
2026-06-09 7:19 ` sashiko-bot [this message]
2026-06-09 7:07 ` [PATCH v2 3/7] perf annotate: Implement elfutils libasm disassembler backend Ian Rogers
2026-06-09 7:07 ` [PATCH v2 4/7] perf annotate: Add --disassembler command-line option Ian Rogers
2026-06-09 7:07 ` [PATCH v2 5/7] perf test: Enhance annotate test coverage and isolate config Ian Rogers
2026-06-09 7:15 ` sashiko-bot
2026-06-09 7:07 ` [PATCH v2 6/7] perf annotate: Support BPF JIT disassembly via genelf Ian Rogers
2026-06-09 7:22 ` sashiko-bot
2026-06-09 7:07 ` [PATCH v2 7/7] perf test: Add BPF JIT annotation test coverage for all disassemblers Ian Rogers
2026-06-09 7:18 ` sashiko-bot
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=20260609071933.1F4B51F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.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