xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86emul: fix test harness build for gas 2.36
@ 2021-04-19 15:30 Jan Beulich
  2021-04-19 15:41 ` Andrew Cooper
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2021-04-19 15:30 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Wei Liu, Roger Pau Monné

All of the sudden, besides .text and .rodata and alike, an always
present .note.gnu.property section has appeared. This section, when
converting to binary format output, gets placed according to its
linked address, causing the resulting blobs to be about 128Mb in size.
The resulting headers with a C representation of the binary blobs then
are, of course all a multiple of that size (and take accordingly long
to create). I didn't bother waiting to see what size the final
test_x86_emulator binary then would have had.

See also https://sourceware.org/bugzilla/show_bug.cgi?id=27753.

Rather than figuring out whether gas supports -mx86-used-note=, simply
remove the section while creating *.bin.

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

--- a/tools/tests/x86_emulator/testcase.mk
+++ b/tools/tests/x86_emulator/testcase.mk
@@ -12,11 +12,11 @@ all: $(TESTCASE).bin
 %.bin: %.c
 	$(CC) $(filter-out -M% .%,$(CFLAGS)) -c $<
 	$(LD) $(LDFLAGS_DIRECT) -N -Ttext 0x100000 -o $*.tmp $*.o
-	$(OBJCOPY) -O binary $*.tmp $@
+	$(OBJCOPY) -O binary -R .note.gnu.property $*.tmp $@
 	rm -f $*.tmp
 %-opmask.bin: opmask.S
 	$(CC) $(filter-out -M% .%,$(CFLAGS)) -c $< -o $(basename $@).o
 	$(LD) $(LDFLAGS_DIRECT) -N -Ttext 0x100000 -o $(basename $@).tmp $(basename $@).o
-	$(OBJCOPY) -O binary $(basename $@).tmp $@
+	$(OBJCOPY) -O binary -R .note.gnu.property $(basename $@).tmp $@
 	rm -f $(basename $@).tmp

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

end of thread, other threads:[~2021-05-07  8:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-19 15:30 [PATCH] x86emul: fix test harness build for gas 2.36 Jan Beulich
2021-04-19 15:41 ` Andrew Cooper
2021-04-19 15:51   ` Jan Beulich
2021-04-29  9:24     ` Ping: " Jan Beulich
2021-05-07  8:22       ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).