* [PATCH] kexec-tools: purgatory: fix build on `binutils-2.42`
@ 2024-01-31 10:05 Sergei Trofimovich
2024-01-31 11:04 ` Baoquan He
0 siblings, 1 reply; 6+ messages in thread
From: Sergei Trofimovich @ 2024-01-31 10:05 UTC (permalink / raw)
To: kexec; +Cc: Baoquan He, Vivek Goyal, Dave Young, Sergei Trofimovich
`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
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] kexec-tools: purgatory: fix build on `binutils-2.42` 2024-01-31 10:05 [PATCH] kexec-tools: purgatory: fix build on `binutils-2.42` Sergei Trofimovich @ 2024-01-31 11:04 ` Baoquan He 2024-02-02 3:01 ` Coiby Xu 0 siblings, 1 reply; 6+ messages in thread From: Baoquan He @ 2024-01-31 11:04 UTC (permalink / raw) To: Sergei Trofimovich; +Cc: kexec, Vivek Goyal, Dave Young, coxu On 01/31/24 at 10:05am, Sergei Trofimovich wrote: > `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 I am not familiar with the gas behaviour, the fix sounds good from discussion in above link. Reviewed-by: Baoquan He <bhe@redhat.com> > > 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: [PATCH] kexec-tools: purgatory: fix build on `binutils-2.42` 2024-01-31 11:04 ` Baoquan He @ 2024-02-02 3:01 ` Coiby Xu 2024-02-02 4:16 ` Baoquan He 0 siblings, 1 reply; 6+ messages in thread From: Coiby Xu @ 2024-02-02 3:01 UTC (permalink / raw) To: Baoquan He Cc: Michel Lind, Sergei Trofimovich, kexec, Vivek Goyal, Dave Young Hi, FYI, before this patch, Michel already sent "[PATCH] Fix building on x86_64 with binutils 2.41" to address the same issue. Currently I almost know nothing about assembly but Michel's patch seems to be more complete because two more files are touched. On Wed, Jan 31, 2024 at 07:04:57PM +0800, Baoquan He wrote: >On 01/31/24 at 10:05am, Sergei Trofimovich wrote: >> `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 > >I am not familiar with the gas behaviour, the fix sounds good from >discussion in above link. > >Reviewed-by: Baoquan He <bhe@redhat.com> > >> >> 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 >> > -- Best regards, Coiby _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kexec-tools: purgatory: fix build on `binutils-2.42` 2024-02-02 3:01 ` Coiby Xu @ 2024-02-02 4:16 ` Baoquan He 2024-02-02 8:57 ` Simon Horman 0 siblings, 1 reply; 6+ messages in thread From: Baoquan He @ 2024-02-02 4:16 UTC (permalink / raw) To: Coiby Xu Cc: Michel Lind, horms, Sergei Trofimovich, kexec, Vivek Goyal, Dave Young On 02/02/24 at 11:01am, Coiby Xu wrote: > Hi, > > FYI, before this patch, Michel already sent "[PATCH] Fix building on x86_64 > with binutils 2.41" to address the same issue. Currently I almost know > nothing about > assembly but Michel's patch seems to be more complete because two more > files are touched. Thanks for telling, I didn't notice that one. I didn't know these either, leave them to Sergei and Michel to decide what is the appropriate solution. > > On Wed, Jan 31, 2024 at 07:04:57PM +0800, Baoquan He wrote: > > On 01/31/24 at 10:05am, Sergei Trofimovich wrote: > > > `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 > > > > I am not familiar with the gas behaviour, the fix sounds good from > > discussion in above link. > > > > Reviewed-by: Baoquan He <bhe@redhat.com> > > > > > > > > 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 > > > > > > > -- > Best regards, > Coiby > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kexec-tools: purgatory: fix build on `binutils-2.42` 2024-02-02 4:16 ` Baoquan He @ 2024-02-02 8:57 ` Simon Horman 2024-02-04 9:07 ` Baoquan He 0 siblings, 1 reply; 6+ messages in thread From: Simon Horman @ 2024-02-02 8:57 UTC (permalink / raw) To: Baoquan He Cc: Coiby Xu, Michel Lind, Sergei Trofimovich, kexec, Vivek Goyal, Dave Young On Fri, Feb 02, 2024 at 12:16:38PM +0800, Baoquan He wrote: > On 02/02/24 at 11:01am, Coiby Xu wrote: > > Hi, > > > > FYI, before this patch, Michel already sent "[PATCH] Fix building on x86_64 > > with binutils 2.41" to address the same issue. Currently I almost know > > nothing about > > assembly but Michel's patch seems to be more complete because two more > > files are touched. > > Thanks for telling, I didn't notice that one. I didn't know these > either, leave them to Sergei and Michel to decide what is the > appropriate solution. Hi, I did go ahead and apply Michael's patch. Let's follow-up with incremental changes if necessary. ... _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kexec-tools: purgatory: fix build on `binutils-2.42` 2024-02-02 8:57 ` Simon Horman @ 2024-02-04 9:07 ` Baoquan He 0 siblings, 0 replies; 6+ messages in thread From: Baoquan He @ 2024-02-04 9:07 UTC (permalink / raw) To: Simon Horman Cc: Coiby Xu, Michel Lind, Sergei Trofimovich, kexec, Vivek Goyal, Dave Young On 02/02/24 at 09:57am, Simon Horman wrote: > On Fri, Feb 02, 2024 at 12:16:38PM +0800, Baoquan He wrote: > > On 02/02/24 at 11:01am, Coiby Xu wrote: > > > Hi, > > > > > > FYI, before this patch, Michel already sent "[PATCH] Fix building on x86_64 > > > with binutils 2.41" to address the same issue. Currently I almost know > > > nothing about > > > assembly but Michel's patch seems to be more complete because two more > > > files are touched. > > > > Thanks for telling, I didn't notice that one. I didn't know these > > either, leave them to Sergei and Michel to decide what is the > > appropriate solution. > > Hi, > > I did go ahead and apply Michael's patch. > Let's follow-up with incremental changes if necessary. Sounds great, thanks. _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-02-04 9:07 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-01-31 10:05 [PATCH] kexec-tools: purgatory: fix build on `binutils-2.42` Sergei Trofimovich 2024-01-31 11:04 ` 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox