diff mbox series

arm32: Avoid using solaris syntax for .section directive

Message ID 20230801001258.555944-1-raj.khem@gmail.com (mailing list archive)
State Superseded
Headers show
Series arm32: Avoid using solaris syntax for .section directive | expand

Commit Message

Khem Raj Aug. 1, 2023, 12:12 a.m. UTC
Assembler from binutils 2.41 rejects this syntax

.section "name"[, flags...]

where flags could be #alloc, #write, #execstr
Switch to using ELF syntax

.section name[, "flags"[, @type]]

[1] https://ftp.gnu.org/old-gnu/Manuals/gas-2.9.1/html_chapter/as_7.html#SEC119

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 xen/arch/arm/arm32/proc-v7.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Jan Beulich Aug. 1, 2023, 7:33 a.m. UTC | #1
On 01.08.2023 02:12, Khem Raj wrote:
> Assembler from binutils 2.41 rejects this syntax
> 
> .section "name"[, flags...]
> 
> where flags could be #alloc, #write, #execstr
> Switch to using ELF syntax

You mean GNU, not ELF (ELF is describing the object format, not the
syntax used). Feels almost like a regression (I'll mention that to
Alan), which likely went unnoticed so far because Linux had changed
to GNU syntax already in 5.5, to allow building with Clang's
integrated assembler. This aspect may be worth mentioning here as
well.

> .section name[, "flags"[, @type]]
> 
> [1] https://ftp.gnu.org/old-gnu/Manuals/gas-2.9.1/html_chapter/as_7.html#SEC119
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>

Out of curiosity - why were there four instances of the patch?
They all look largely identical; if there are differences, I haven't
spotted them.

Jan
Khem Raj Aug. 1, 2023, 2:51 p.m. UTC | #2
On Tue, Aug 1, 2023 at 12:33 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 01.08.2023 02:12, Khem Raj wrote:
> > Assembler from binutils 2.41 rejects this syntax
> >
> > .section "name"[, flags...]
> >
> > where flags could be #alloc, #write, #execstr
> > Switch to using ELF syntax
>
> You mean GNU, not ELF (ELF is describing the object format, not the
> syntax used). Feels almost like a regression (I'll mention that to
> Alan), which likely went unnoticed so far because Linux had changed
> to GNU syntax already in 5.5, to allow building with Clang's
> integrated assembler. This aspect may be worth mentioning here as
> well.

OK will send v2

>
> > .section name[, "flags"[, @type]]
> >
> > [1] https://ftp.gnu.org/old-gnu/Manuals/gas-2.9.1/html_chapter/as_7.html#SEC119
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
>
> Out of curiosity - why were there four instances of the patch?
> They all look largely identical; if there are differences, I haven't
> spotted them.

there should not have been
I was a not a subscriber to mailing list, did not realize why it was
not appearing on ml :)

>
> Jan
diff mbox series

Patch

diff --git a/xen/arch/arm/arm32/proc-v7.S b/xen/arch/arm/arm32/proc-v7.S
index c90a31d80f..6d3d19b873 100644
--- a/xen/arch/arm/arm32/proc-v7.S
+++ b/xen/arch/arm/arm32/proc-v7.S
@@ -29,7 +29,7 @@  brahma15mp_init:
         mcr   CP32(r0, ACTLR)
         mov   pc, lr
 
-        .section ".proc.info", #alloc
+        .section .proc.info, "a"
         .type __v7_ca15mp_proc_info, #object
 __v7_ca15mp_proc_info:
         .long 0x410FC0F0             /* Cortex-A15 */
@@ -38,7 +38,7 @@  __v7_ca15mp_proc_info:
         .long caxx_processor
         .size __v7_ca15mp_proc_info, . - __v7_ca15mp_proc_info
 
-        .section ".proc.info", #alloc
+        .section .proc.info, "a"
         .type __v7_ca7mp_proc_info, #object
 __v7_ca7mp_proc_info:
         .long 0x410FC070             /* Cortex-A7 */
@@ -47,7 +47,7 @@  __v7_ca7mp_proc_info:
         .long caxx_processor
         .size __v7_ca7mp_proc_info, . - __v7_ca7mp_proc_info
 
-        .section ".proc.info", #alloc
+        .section .proc.info, "a"
         .type __v7_brahma15mp_proc_info, #object
 __v7_brahma15mp_proc_info:
         .long 0x420F00F0             /* Broadcom Brahma-B15 */