x86/build: Move exception tables into __ro_after_init
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 6 Dec 2021 13:07:08 +0000 (13:07 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 9 Dec 2021 16:26:29 +0000 (16:26 +0000)
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@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Wei Liu <wl@xen.org>
xen/arch/x86/xen.lds.S

index 4db5b404e0739c1cfc26743da758c9cce2bedb8c..ca22e984f80752adf70f0e2917f63b0c18a1855b 100644 (file)
@@ -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 = .;