* [PATCH] x86/build: Move exception tables into __ro_after_init
@ 2021-12-06 13:07 Andrew Cooper
2021-12-06 13:46 ` Jan Beulich
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cooper @ 2021-12-06 13:07 UTC (permalink / raw)
To: Xen-devel; +Cc: Andrew Cooper, Jan Beulich, Roger Pau Monné, Wei Liu
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 <andrew.cooper3@citrix.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 | 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 4db5b404e073..ca22e984f807 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 = .;
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/build: Move exception tables into __ro_after_init
2021-12-06 13:07 [PATCH] x86/build: Move exception tables into __ro_after_init Andrew Cooper
@ 2021-12-06 13:46 ` Jan Beulich
0 siblings, 0 replies; 2+ messages in thread
From: Jan Beulich @ 2021-12-06 13:46 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Roger Pau Monné, Wei Liu, Xen-devel
On 06.12.2021 14:07, Andrew Cooper wrote:
> 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 <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-06 13:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 13:07 [PATCH] x86/build: Move exception tables into __ro_after_init Andrew Cooper
2021-12-06 13:46 ` Jan Beulich
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.