From: Nathan Chancellor <nathan@kernel.org>
To: Sathvika Vasireddy <sv@linux.ibm.com>
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, masahiroy@kernel.org,
kees@kernel.org, naveen@kernel.org, jpoimboe@kernel.org,
peterz@infradead.org, npiggin@gmail.com, maddy@linux.ibm.com,
segher@kernel.crashing.org, christophe.leroy@csgroup.eu,
mingo@kernel.org, mpe@ellerman.id.au, nsc@kernel.org
Subject: Re: [RFC PATCH v3 6/6] powerpc: Enable build-time feature fixup processing by default
Date: Tue, 10 Feb 2026 14:20:07 -0700 [thread overview]
Message-ID: <20260210212007.GA1148627@ax162> (raw)
In-Reply-To: <20260209084820.57298-7-sv@linux.ibm.com>
On Mon, Feb 09, 2026 at 02:18:20PM +0530, Sathvika Vasireddy wrote:
> diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux
> index e3dd7fc62f20..3d2a203b8908 100644
> --- a/scripts/Makefile.vmlinux
> +++ b/scripts/Makefile.vmlinux
> @@ -88,6 +88,11 @@ remove-section-$(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS) += '.rel*' '!.rel*.dyn'
> # https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=c12d9fa2afe7abcbe407a00e15719e1a1350c2a7
> remove-section-$(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS) += '.rel.*'
>
> +# --emit-relocs produces .rela.* sections needed by objtool --ftr-fixup;
> +# strip them from vmlinux after fixup processing is complete.
> +remove-section-$(CONFIG_HAVE_OBJTOOL_FTR_FIXUP) += '.rel*' '!.rel*.dyn'
> +remove-section-$(CONFIG_HAVE_OBJTOOL_FTR_FIXUP) += '.rel.*'
Rather than duplicating the remove-section values from
CONFIG_ARCH_VMLINUX_NEEDS_RELOCS, I would like to see them combined with
something like:
diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux
index fcae1e432d9a..f70c3a36aee2 100644
--- a/scripts/Makefile.vmlinux
+++ b/scripts/Makefile.vmlinux
@@ -81,11 +81,15 @@ endif
# vmlinux
# ---------------------------------------------------------------------------
+# These configurations require vmlinux.unstripped to be linked with
+# '--emit-relocs', which need to be stripped from the final vmlinux.
+uses-emit-relocs := $(or $(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS),$(CONFIG_HAVE_OBJTOOL_FTR_FIXUP))
+
remove-section-y := .modinfo
-remove-section-$(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS) += '.rel*' '!.rel*.dyn'
+remove-section-$(uses-emit-relocs) += '.rel*' '!.rel*.dyn'
# for compatibility with binutils < 2.32
# https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=c12d9fa2afe7abcbe407a00e15719e1a1350c2a7
-remove-section-$(CONFIG_ARCH_VMLINUX_NEEDS_RELOCS) += '.rel.*'
+remove-section-$(uses-emit-relocs) += '.rel.*'
remove-symbols := -w --strip-unneeded-symbol='__mod_device_table__*'
prev parent reply other threads:[~2026-02-10 21:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-09 8:48 [RFC PATCH v3 0/6] objtool: Fixup alternate feature relative addresses Sathvika Vasireddy
2026-02-09 8:48 ` [RFC PATCH v3 1/6] objtool/powerpc: Add build-time fixup of alternate feature branch targets Sathvika Vasireddy
2026-02-10 8:13 ` kernel test robot
2026-02-09 8:48 ` [RFC PATCH v3 2/6] objtool: Set ELF_F_LAYOUT flag to preserve vmlinux segment layout Sathvika Vasireddy
2026-02-09 8:48 ` [RFC PATCH v3 3/6] objtool: Fix "can't find starting instruction" warnings on vmlinux Sathvika Vasireddy
2026-02-09 8:48 ` [RFC PATCH v3 4/6] objtool/powerpc: Skip jump destination analysis and unnanotated intra-function call warnings for --ftr-fixup Sathvika Vasireddy
2026-02-09 8:48 ` [RFC PATCH v3 5/6] kbuild: Add objtool integration for PowerPC feature fixups Sathvika Vasireddy
2026-02-09 8:48 ` [RFC PATCH v3 6/6] powerpc: Enable build-time feature fixup processing by default Sathvika Vasireddy
2026-02-10 21:20 ` Nathan Chancellor [this message]
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=20260210212007.GA1148627@ax162 \
--to=nathan@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=jpoimboe@kernel.org \
--cc=kees@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=masahiroy@kernel.org \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=naveen@kernel.org \
--cc=npiggin@gmail.com \
--cc=nsc@kernel.org \
--cc=peterz@infradead.org \
--cc=segher@kernel.crashing.org \
--cc=sv@linux.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.