x86: use constant flags for section .init.rodata
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 27 Aug 2020 07:53:46 +0000 (09:53 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 27 Aug 2020 07:53:46 +0000 (09:53 +0200)
LLVM 11 complains with:

<instantiation>:1:1: error: changed section flags for .init.rodata, expected: 0x2
.pushsection .init.rodata
^
<instantiation>:30:9: note: while in macro instantiation
        entrypoint 0
        ^
entry.S:979:9: note: while in macro instantiation
        .rept 256
        ^

And:

entry.S:1015:9: error: changed section flags for .init.rodata, expected: 0x2
        .section .init.rodata
        ^

Fix it by explicitly using the same flags and type in all the
instances.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/x86_64/entry.S

index 8b57a0004096b1a8a767d10de005c4888c3638c8..1e880eb9f672357a27a603f161fc4ab0bf246e3a 100644 (file)
@@ -967,7 +967,7 @@ GLOBAL(trap_nop)
 GLOBAL(autogen_entrypoints)
         /* pop into the .init.rodata section and record an entry point. */
         .macro entrypoint ent
-        .pushsection .init.rodata
+        .pushsection .init.rodata, "a", @progbits
         .quad \ent
         .popsection
         .endm
@@ -1012,5 +1012,5 @@ autogen_stubs: /* Automatically generated stubs. */
         vec = vec + 1
         .endr
 
-        .section .init.rodata
+        .section .init.rodata, "a", @progbits
         .size autogen_entrypoints, . - autogen_entrypoints