Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Trofimovich <slyich@gmail.com>
To: kexec@lists.infradead.org
Cc: Baoquan He <bhe@redhat.com>, Vivek Goyal <vgoyal@redhat.com>,
	Dave Young <dyoung@redhat.com>,
	Sergei Trofimovich <slyich@gmail.com>
Subject: [PATCH] kexec-tools: purgatory: fix build on `binutils-2.42`
Date: Wed, 31 Jan 2024 10:05:08 +0000	[thread overview]
Message-ID: <20240131100508.2013016-1-slyich@gmail.com> (raw)

`binutils-2.42` introduced stricter checks on what `.arch` can be used
in 64-bit mode and started failing the build as:

    $ as-2.42 --64 -o entry32-16-debug.o entry32-16-debug.s
    purgatory/arch/i386/entry32-16-debug.S: Assembler messages:
    purgatory/arch/i386/entry32-16-debug.S:28: Error: 64bit mode not supported on `i386'.

The change moves `.code32` before `.arch 386` as suggested in
https://sourceware.org/PR31319

Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
---
 purgatory/arch/i386/entry32-16-debug.S | 2 +-
 purgatory/arch/i386/entry32-16.S       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/purgatory/arch/i386/entry32-16-debug.S b/purgatory/arch/i386/entry32-16-debug.S
index 5167944..297d6f5 100644
--- a/purgatory/arch/i386/entry32-16-debug.S
+++ b/purgatory/arch/i386/entry32-16-debug.S
@@ -25,10 +25,10 @@
 	.globl entry16_debug_pre32
 	.globl entry16_debug_first32
 	.globl entry16_debug_old_first32
+	.code32
 	.arch i386
 	.balign 16
 entry16_debug:
-	.code32
 	/* Compute where I am running at (assumes esp valid) */
 	call	1f
 1:	popl	%ebx
diff --git a/purgatory/arch/i386/entry32-16.S b/purgatory/arch/i386/entry32-16.S
index c051aab..7a84565 100644
--- a/purgatory/arch/i386/entry32-16.S
+++ b/purgatory/arch/i386/entry32-16.S
@@ -20,10 +20,10 @@
 #undef i386	
 	.text
 	.globl entry16, entry16_regs
+	.code32
 	.arch i386
 	.balign 16
 entry16:
-	.code32
 	/* Compute where I am running at (assumes esp valid) */
 	call	1f
 1:	popl	%ebx
-- 
2.43.0


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

             reply	other threads:[~2024-01-31 11:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 10:05 Sergei Trofimovich [this message]
2024-01-31 11:04 ` [PATCH] kexec-tools: purgatory: fix build on `binutils-2.42` Baoquan He
2024-02-02  3:01   ` Coiby Xu
2024-02-02  4:16     ` Baoquan He
2024-02-02  8:57       ` Simon Horman
2024-02-04  9:07         ` Baoquan He

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=20240131100508.2013016-1-slyich@gmail.com \
    --to=slyich@gmail.com \
    --cc=bhe@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=vgoyal@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox