[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] x86: use constant flags for section .init.rodata


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Wed, 26 Aug 2020 15:51:59 +0200
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 26 Aug 2020 13:52:25 +0000
  • Ironport-sdr: OLukaG2S5K5FigtpVie7v8uq6NSTruDyl9YEFhuApxF2NgX8jY6OR6iVy5qd+MF3FnGV4PNbL3 s9g2Qz3TogeoTVyKQYK1k5/WI1A0gOdfYmOqXpIVY2zl4L3dlIBr3zlb9qfTXSDFCx7JuyNm4d ul2eT/ivGqMSiA/pcAovRCfibBeD544otdAvSE/vkLV4mS4+GICwKed10P4BF33IA7t7Me/HEP lHowDkCESH+3/UEUZDyq4XeG8+JvisK4G2DDXZFrwUFfbHHxxdu3h+mRhJ78kz3uYlvKMaq5ZJ mPg=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxx>
---
 xen/arch/x86/x86_64/entry.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S
index 8b57a00040..1e880eb9f6 100644
--- a/xen/arch/x86/x86_64/entry.S
+++ b/xen/arch/x86/x86_64/entry.S
@@ -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
-- 
2.28.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.