x86/build: Move exception tables into __ro_after_init
PATCH 1/1 x86/build: Move exception tables into __ro_after_init
It turns out that we've always been abusing 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 <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>
--- xen/arch/x86/xen.lds.S | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
xen/arch/x86/xen.lds.S +12 -11
@@ -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 = .;
Signature · 1 line
2.11.0
Quoted 7 lines · Andrew Cooper
It turns out that we've always been abusing 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_initconcept, reposition them to better match reality.Signed-off-by Andrew Cooper <[email protected]>
Reviewed-by Jan Beulich <[email protected]>