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@citrix.com>
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
*(SORT(.init_array.*))
__ctors_end = .;
} :text
+
+ .got : {
+ *(.got)
+ } : text
+
+ .got.plt : {
+ *(.got.plt)
+ } : text
+
. = ALIGN(POINTER_ALIGN);
__init_end = .;
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")