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

[xen staging] x86/build: Move exception tables into __ro_after_init



commit a0c3cd03ce76313a7c461ecb3e70b513a15453f7
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Mon Dec 6 13:07:08 2021 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Thu Dec 9 16:26:29 2021 +0000

    x86/build: Move exception tables into __ro_after_init
    
    Since c/s 79713ed0a94c ("x86: move both exception tables into .rodata") in
    2016, we've been (ab)using the fact that .rodata is read/write during early
    boot, so we can sort the two tables.
    
    Now that we have a real __ro_after_init concept, reposition them to better
    match reality.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    ---
    CC: Jan Beulich <JBeulich@xxxxxxxx>
    CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    CC: Wei Liu <wl@xxxxxxx>
---
 xen/arch/x86/xen.lds.S | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
index 4db5b404e0..ca22e984f8 100644
--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -100,6 +100,18 @@ SECTIONS
 
        __ro_after_init_start = .;
        *(.data.ro_after_init)
+
+       . = ALIGN(8);
+       /* Exception table */
+       __start___ex_table = .;
+       *(.ex_table)
+       __stop___ex_table = .;
+
+       /* Pre-exception table */
+       __start___pre_ex_table = .;
+       *(.ex_table.pre)
+       __stop___pre_ex_table = .;
+
        . = ALIGN(PAGE_SIZE);
        __ro_after_init_end = .;
 
@@ -129,17 +141,6 @@ SECTIONS
        *(.note.gnu.build-id)
        __note_gnu_build_id_end = .;
 #endif
-       . = ALIGN(8);
-       /* Exception table */
-       __start___ex_table = .;
-       *(.ex_table)
-       __stop___ex_table = .;
-
-       /* Pre-exception table */
-       __start___pre_ex_table = .;
-       *(.ex_table.pre)
-       __stop___pre_ex_table = .;
-
 #ifdef CONFIG_HAS_VPCI
        . = ALIGN(POINTER_ALIGN);
        __start_vpci_array = .;
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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