[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aLCoGIEXLRrQ9PmL@levanger>
Date: Thu, 28 Aug 2025 21:03:52 +0200
From: Nicolas Schier <nsc@...nel.org>
To: Steven Rostedt <rostedt@...nel.org>
Cc: linux-kernel@...r.kernel.org, Stephen Rothwell <sfr@...b.auug.org.au>,
Masami Hiramatsu <mhiramat@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>,
Masahiro Yamada <masahiroy@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <nick.desaulniers+lkml@...il.com>,
Catalin Marinas <catalin.marinas@....com>,
Randy Dunlap <rdunlap@...radead.org>
Subject: Re: [for-next][PATCH 1/3] sorttable: Move ELF parsing into
scripts/elf-parse.[ch]
On Thu, Aug 28, 2025 at 02:27:55PM -0400, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@...dmis.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@...nel.org>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Arnd Bergmann <arnd@...db.de>
> Cc: Masahiro Yamada <masahiroy@...nel.org>
> Cc: Nathan Chancellor <nathan@...nel.org>
> Cc: Nicolas Schier <nicolas.schier@...ux.dev>
> Cc: Nick Desaulniers <nick.desaulniers+lkml@...il.com>
> Cc: Catalin Marinas <catalin.marinas@....com>
> Cc: Linus Torvalds <torvalds@...ux-foundation.org>
> Cc: Randy Dunlap <rdunlap@...radead.org>
> Link: https://lore.kernel.org/20250825231355.597630284@kernel.org
> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.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
Powered by blists - more mailing lists