All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86emul: avoid assembler warning about .type not taking effect in test harness
@ 2020-07-07  9:35 Jan Beulich
  2020-07-07 13:55 ` Jan Beulich
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2020-07-07  9:35 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Paul Durrant, Wei Liu, Roger Pau Monné

gcc 9.3 started to re-order top level blocks by default when optimizing.
This re-ordering results in all our .type directives to get emitted to
the assembly file first, followed by gcc's. The assembler warns about
attempts to change the type of a symbol when it was already set (and
when there's no intervening setting to "notype").

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -295,4 +295,9 @@ x86-emulate.o cpuid.o test_x86_emulator.
 x86-emulate.o: x86_emulate/x86_emulate.c
 x86-emulate.o: HOSTCFLAGS += -D__XEN_TOOLS__
 
+# In order for our custom .type assembler directives to reliably land after
+# gcc's, we need to keep it from re-ordering top-level constructs.
+$(call cc-option-add,HOSTCFLAGS-toplevel,HOSTCC,-fno-toplevel-reorder)
+test_x86_emulator.o: HOSTCFLAGS += $(HOSTCFLAGS-toplevel)
+
 test_x86_emulator.o: $(addsuffix .h,$(TESTCASES)) $(addsuffix -opmask.h,$(OPMASK))


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

* Re: [PATCH] x86emul: avoid assembler warning about .type not taking effect in test harness
  2020-07-07  9:35 [PATCH] x86emul: avoid assembler warning about .type not taking effect in test harness Jan Beulich
@ 2020-07-07 13:55 ` Jan Beulich
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Beulich @ 2020-07-07 13:55 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Roger Pau Monné, Wei Liu, Paul Durrant

On 07.07.2020 11:35, Jan Beulich wrote:
> gcc 9.3 started to re-order top level blocks by default when optimizing.
> This re-ordering results in all our .type directives to get emitted to
> the assembly file first, followed by gcc's. The assembler warns about
> attempts to change the type of a symbol when it was already set (and
> when there's no intervening setting to "notype").

Turns out this wasn't a gcc change - the problem had been there all the
time, it just went through silently. It was the newer gas that I built
gcc 9.3 with that caused to issue to become visible. I've slightly
updated the description to account for this.

Jan


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

end of thread, other threads:[~2020-07-07 13:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07  9:35 [PATCH] x86emul: avoid assembler warning about .type not taking effect in test harness Jan Beulich
2020-07-07 13:55 ` 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.