From: Nicolas Schier <nsc@kernel.org>
To: Steven Rostedt <rostedt@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Stephen Rothwell <sfr@canb.auug.org.au>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Arnd Bergmann <arnd@arndb.de>,
Masahiro Yamada <masahiroy@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [for-next][PATCH 1/3] sorttable: Move ELF parsing into scripts/elf-parse.[ch]
Date: Thu, 28 Aug 2025 21:03:52 +0200 [thread overview]
Message-ID: <aLCoGIEXLRrQ9PmL@levanger> (raw)
In-Reply-To: <20250828183125.288650678@kernel.org>
On Thu, Aug 28, 2025 at 02:27:55PM -0400, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
>
> In order to share the elf parsing that is in sorttable.c so that other
> programs could use the same code, move it into elf-parse.c and
> elf-parse.h.
>
> Cc: Masami Hiramatsu <mhiramat@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Nathan Chancellor <nathan@kernel.org>
> Cc: Nicolas Schier <nicolas.schier@linux.dev>
> Cc: Nick Desaulniers <nick.desaulniers+lkml@gmail.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Link: https://lore.kernel.org/20250825231355.597630284@kernel.org
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
> scripts/Makefile | 3 +
> scripts/Makefile.vmlinux | 2 +
> scripts/elf-parse.c | 198 ++++++++++++++++
> scripts/elf-parse.h | 305 +++++++++++++++++++++++++
> scripts/sorttable.c | 477 +++------------------------------------
> 5 files changed, 542 insertions(+), 443 deletions(-)
> create mode 100644 scripts/elf-parse.c
> create mode 100644 scripts/elf-parse.h
>
> diff --git a/scripts/Makefile b/scripts/Makefile
> index 46f860529df5..f19624b3ed92 100644
> --- a/scripts/Makefile
> +++ b/scripts/Makefile
> @@ -12,6 +12,8 @@ hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
> hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_builder
> hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_gen
>
> +sorttable-objs := sorttable.o elf-parse.o
> +
> ifneq ($(or $(CONFIG_X86_64),$(CONFIG_X86_32)),)
> always-$(CONFIG_RUST) += target.json
> filechk_rust_target = $< < include/config/auto.conf
> @@ -25,6 +27,7 @@ generate_rust_target-rust := y
> rustdoc_test_builder-rust := y
> rustdoc_test_gen-rust := y
>
> +HOSTCFLAGS_elf-parse.o = -I$(srctree)/tools/include
> HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include
> HOSTLDLIBS_sorttable = -lpthread
> HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
> diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux
> index b64862dc6f08..ebbb8b5aca83 100644
> --- a/scripts/Makefile.vmlinux
> +++ b/scripts/Makefile.vmlinux
> @@ -97,6 +97,8 @@ ifdef CONFIG_BUILDTIME_TABLE_SORT
> $(vmlinux-final): scripts/sorttable
> endif
>
> +.PRECIOUS: $(vmlinux-final)
Why do you need '.PRECIOUS' here? Does its need match to Masahiros
explanations in
https://git.kernel.org/torvalds/c/875ef1a57f32fcb91010dc9bc8bd1166956a579e
Kind regards,
Nicolas
next prev parent reply other threads:[~2025-08-28 19:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-28 18:27 [for-next][PATCH 0/3] tracing: Trigger a warning on build if a tracepoint is defined but unused Steven Rostedt
2025-08-28 18:27 ` [for-next][PATCH 1/3] sorttable: Move ELF parsing into scripts/elf-parse.[ch] Steven Rostedt
2025-08-28 19:03 ` Nicolas Schier [this message]
2025-08-28 19:36 ` Steven Rostedt
2025-08-28 18:27 ` [for-next][PATCH 2/3] tracing: Add a tracepoint verification check at build time Steven Rostedt
2025-08-28 18:27 ` [for-next][PATCH 3/3] tracepoint: Do not warn for unused event that is exported Steven Rostedt
2025-08-28 21:02 ` [for-next][PATCH 0/3] tracing: Trigger a warning on build if a tracepoint is defined but unused Stephen Rothwell
2025-08-28 21:13 ` Steven Rostedt
2025-08-29 12:10 ` Steven Rostedt
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=aLCoGIEXLRrQ9PmL@levanger \
--to=nsc@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=masahiroy@kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=rdunlap@infradead.org \
--cc=rostedt@kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).