x86/guest: Fix assembler warnings with newer binutils
PATCH 1/1 x86/guest: Fix assembler warnings with newer binutils
GAS of at least version 2.34 complains:
hypercall_page.S: Assembler messages:
hypercall_page.S:24: Warning: symbol 'HYPERCALL_set_trap_table' already has its type set
...
hypercall_page.S:71: Warning: symbol 'HYPERCALL_arch_7' already has its type set
This is because the whole page is declared as STT_OBJECT, and then every hypercall within it is declared as STT_FUNC. As these are function-like and in .text, retain the STT_FUNC type and drop STT_OBJECT.
---
CC: Jan Beulich <[email protected]>
CC: Wei Liu <[email protected]>
CC: Roger Pau Monné <[email protected]>
Alternative suggestions welcome. I've got half a mind to strip the unused hypercalls, as a large chunk of them are PV only and will never be used by a PVH Xen. This would also remove the existing alias between hypercall_page and HYPERCALL_set_trap_table.
--- xen/arch/x86/guest/xen/hypercall_page.S | 1 - 1 file changed, 1 deletion(-)
xen/arch/x86/guest/xen/hypercall_page.S +0 -1
@@ -8,7 +8,6 @@ GLOBAL(hypercall_page) /* Poisoned with `ret` for safety before hypercalls are set up. */ .fill PAGE_SIZE, 1, 0xc3 - .type hypercall_page, STT_OBJECT .size hypercall_page, PAGE_SIZE /*
Signature · 1 line
2.11.0
xen/arch/x86/guest/xen/hypercall_page.S line 11
Quoted 8 lines · Andrew Cooper
xen/arch/x86/guest/xen/hypercall_page.S +0
-1@@ -8,7 +8,6 @@ GLOBAL(hypercall_page) /* Poisoned with `ret` for safety before hypercalls are set up. */ .fill PAGE_SIZE, 1, 0xc3 - .type hypercall_page, STT_OBJECT .size hypercall_page, PAGE_SIZE
Looks like we don't need to sacrifice type setting here: Simply moving .type ahead of .set in DECLARE_HYPERCALL() seems to also help. To save a roundtrip, this alternative change
Jan