All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/guest: Fix assembler warnings with newer binutils
@ 2020-05-12 16:28 Andrew Cooper
  2020-05-13 14:31 ` Jan Beulich
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cooper @ 2020-05-12 16:28 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Wei Liu, Jan Beulich, Roger Pau Monné

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.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wl@xen.org>
CC: Roger Pau Monné <roger.pau@citrix.com>

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(-)

diff --git a/xen/arch/x86/guest/xen/hypercall_page.S b/xen/arch/x86/guest/xen/hypercall_page.S
index 6485e9150e..9673846b7d 100644
--- a/xen/arch/x86/guest/xen/hypercall_page.S
+++ b/xen/arch/x86/guest/xen/hypercall_page.S
@@ -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
 
 /*
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86/guest: Fix assembler warnings with newer binutils
  2020-05-12 16:28 [PATCH] x86/guest: Fix assembler warnings with newer binutils Andrew Cooper
@ 2020-05-13 14:31 ` Jan Beulich
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Beulich @ 2020-05-13 14:31 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Xen-devel, Wei Liu, Roger Pau Monné

On 12.05.2020 18:28, Andrew Cooper wrote:
> --- a/xen/arch/x86/guest/xen/hypercall_page.S
> +++ b/xen/arch/x86/guest/xen/hypercall_page.S
> @@ -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
Reviewed-by: Jan Beulich <jbeulich@suse.com>

Jan


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-13 14:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12 16:28 [PATCH] x86/guest: Fix assembler warnings with newer binutils Andrew Cooper
2020-05-13 14:31 ` 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.