|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen/riscv: add explicit check that .got{.plt} is empty
commit 3146c0f10140e23594c8185568f887111e504977
Author: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
AuthorDate: Tue Apr 18 08:25:50 2023 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Apr 18 08:25:50 2023 +0200
xen/riscv: add explicit check that .got{.plt} is empty
The GOT sections usage should be avoided in the hypervisor
so to catch such use cases earlier when GOT things are
produced the patch introduces .got and .got.plt sections
and adds asserts that they're empty.
The sections won't be created until they remain
empty otherwise the asserts would cause early failure.
Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Alistair Francis <alistair.francis@xxxxxxx>
---
xen/arch/riscv/xen.lds.S | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/xen/arch/riscv/xen.lds.S b/xen/arch/riscv/xen.lds.S
index 2ed70eccc6..31e0d3576c 100644
--- a/xen/arch/riscv/xen.lds.S
+++ b/xen/arch/riscv/xen.lds.S
@@ -124,6 +124,15 @@ SECTIONS
*(SORT(.init_array.*))
__ctors_end = .;
} :text
+
+ .got : {
+ *(.got)
+ } : text
+
+ .got.plt : {
+ *(.got.plt)
+ } : text
+
. = ALIGN(POINTER_ALIGN);
__init_end = .;
@@ -160,3 +169,6 @@ SECTIONS
ASSERT(IS_ALIGNED(__bss_start, POINTER_ALIGN), "__bss_start is
misaligned")
ASSERT(IS_ALIGNED(__bss_end, POINTER_ALIGN), "__bss_end is misaligned")
+
+ASSERT(!SIZEOF(.got), ".got non-empty")
+ASSERT(!SIZEOF(.got.plt), ".got.plt non-empty")
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |