All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	 dave.hansen@linux.intel.com
Cc: x86@kernel.org, hpa@zytor.com, ndesaulniers@google.com,
	 morbo@google.com, justinstitt@google.com, song@kernel.org,
	 ribalda@chromium.org, linux-kernel@vger.kernel.org,
	llvm@lists.linux.dev,  patches@lists.linux.dev,
	Nathan Chancellor <nathan@kernel.org>
Subject: [PATCH 2/2] x86/purgatory: Enable orphan section warnings
Date: Wed, 17 Apr 2024 14:53:46 -0700	[thread overview]
Message-ID: <20240417-x86-fix-kexec-with-llvm-18-v1-2-5383121e8fb7@kernel.org> (raw)
In-Reply-To: <20240417-x86-fix-kexec-with-llvm-18-v1-0-5383121e8fb7@kernel.org>

Now that the purgatory has a linker script that explicitly describes all
of its sections, turn on orphan section warnings for it so that new
sections do not appear without notice.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 arch/x86/purgatory/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile
index dfc030a4cca9..a6c8239abcba 100644
--- a/arch/x86/purgatory/Makefile
+++ b/arch/x86/purgatory/Makefile
@@ -17,7 +17,7 @@ CFLAGS_sha256.o := -D__DISABLE_EXPORTS -D__NO_FORTIFY
 # When linking purgatory.ro with -r unresolved symbols are not checked,
 # also link a purgatory.chk binary without -r to check for unresolved symbols.
 PURGATORY_LDFLAGS := -z nodefaultlib
-LDFLAGS_purgatory.ro := -r $(PURGATORY_LDFLAGS) -T
+LDFLAGS_purgatory.ro := --orphan-handling=$(CONFIG_LD_ORPHAN_WARN_LEVEL) -r $(PURGATORY_LDFLAGS) -T
 LDFLAGS_purgatory.chk := -e purgatory_start $(PURGATORY_LDFLAGS)
 targets += purgatory.ro purgatory.chk
 

-- 
2.44.0


  parent reply	other threads:[~2024-04-17 21:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 21:53 [PATCH 0/2] x86/purgatory: Avoid kexec runtime warning with LLVM 18 Nathan Chancellor
2024-04-17 21:53 ` [PATCH 1/2] x86/purgatory: Add a linker script Nathan Chancellor
2024-04-17 21:53 ` Nathan Chancellor [this message]
2024-04-18 11:14 ` [PATCH 0/2] x86/purgatory: Avoid kexec runtime warning with LLVM 18 Borislav Petkov
2024-04-18 15:15   ` Nathan Chancellor
2024-04-18 15:44   ` Nick Desaulniers
2024-04-18 15:59     ` Ard Biesheuvel
2024-04-18 17:52       ` Ard Biesheuvel

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=20240417-x86-fix-kexec-with-llvm-18-v1-2-5383121e8fb7@kernel.org \
    --to=nathan@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=justinstitt@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mingo@redhat.com \
    --cc=morbo@google.com \
    --cc=ndesaulniers@google.com \
    --cc=patches@lists.linux.dev \
    --cc=ribalda@chromium.org \
    --cc=song@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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 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.