qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: "Alex Bennée" <alex.bennee@linaro.org>, peter.maydell@linaro.org
Cc: "Thomas Huth" <thuth@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	qemu-devel@nongnu.org, "Willian Rampazzo" <willianr@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Alexandre Iooss" <erdnaxe@crans.org>,
	"Mahmoud Mandour" <ma.mandourr@gmail.com>
Subject: Re: [PULL 32/40] tcg/plugins: enable by default for most TCG builds
Date: Fri, 16 Jul 2021 13:28:23 +0200	[thread overview]
Message-ID: <a3f05bc9-808d-0572-3e17-df9cf9418b4e@de.ibm.com> (raw)
In-Reply-To: <530cf27c-13cb-906e-6b86-90c23d0c3656@de.ibm.com>



On 16.07.21 08:54, Christian Borntraeger wrote:
> 
> On 12.07.21 14:26, Alex Bennée wrote:
>> Aside from a minor bloat to file size the ability to have TCG plugins
>> has no real impact on performance unless a plugin is actively loaded.
>> Even then the libempty.so plugin shows only a minor degradation in
>> performance caused by the extra book keeping the TCG has to do to keep
>> track of instructions. As it's a useful feature lets just enable it by
>> default and reduce our testing matrix a little.
>>
>> We need to move our linker testing earlier so we can be sure we can
>> enable the loader module required. As we have ruled out static &
>> plugins in an earlier patch we can also reduce the indent a little.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> Reviewed-by: Thomas Huth <thuth@redhat.com>
>> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> Message-Id: <20210709143005.1554-33-alex.bennee@linaro.org>
> 
> 
> I cant reproduce it manually but in our build regression this fails with

I can now reproduce when adding
  --extra-ldflags="-Wl,--build-id -pie -Wl,-z,relro -Wl,-z,now"
to the configure script (on "20.04.2 LTS)


----snip---
   GIT     ui/keycodemapdb meson tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 capstone slirp roms/SLOF
[1/1472] Linking target tests/plugin/libempty.so
FAILED: tests/plugin/libempty.so
cc  -o tests/plugin/libempty.so tests/plugin/libempty.so.p/empty.c.o -Wl,--as-needed -Wl,--allow-shlib-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libempty.so -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -m64 -Wl,--build-id -pie -Wl,-z,relro -Wl,-z,now -O2 -g -fPIE -DPIE -fstack-protector-strong -Wl,--export-dynamic -pthread -lgmodule-2.0 -lglib-2.0 -Wl,--end-group
/usr/bin/ld: /usr/lib/gcc/s390x-linux-gnu/9/../../../s390x-linux-gnu/Scrt1.o: in function `_start':
(.text+0x34): undefined reference to `main'
/usr/bin/ld: tests/plugin/libempty.so.p/empty.c.o: in function `qemu_plugin_install':
/home/cborntra/REPOS/qemu/build/../tests/plugin/empty.c:30: undefined reference to `qemu_plugin_register_vcpu_tb_trans_cb'
collect2: error: ld returned 1 exit status
[2/1472] Linking target tests/plugin/libsyscall.so
FAILED: tests/plugin/libsyscall.so
cc  -o tests/plugin/libsyscall.so tests/plugin/libsyscall.so.p/syscall.c.o -Wl,--as-needed -Wl,--allow-shlib-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libsyscall.so -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -m64 -Wl,--build-id -pie -Wl,-z,relro -Wl,-z,now -O2 -g -fPIE -DPIE -fstack-protector-strong -Wl,--export-dynamic -pthread -lgmodule-2.0 -lglib-2.0 -Wl,--end-group
/usr/bin/ld: /usr/lib/gcc/s390x-linux-gnu/9/../../../s390x-linux-gnu/Scrt1.o: in function `_start':
(.text+0x34): undefined reference to `main'
/usr/bin/ld: tests/plugin/libsyscall.so.p/syscall.c.o: in function `print_entry':
/home/cborntra/REPOS/qemu/build/../tests/plugin/syscall.c:88: undefined reference to `qemu_plugin_outs'
/usr/bin/ld: tests/plugin/libsyscall.so.p/syscall.c.o: in function `plugin_exit':
/home/cborntra/REPOS/qemu/build/../tests/plugin/syscall.c:109: undefined reference to `qemu_plugin_outs'
/usr/bin/ld: tests/plugin/libsyscall.so.p/syscall.c.o: in function `vcpu_syscall_ret':
/home/cborntra/REPOS/qemu/build/../tests/plugin/syscall.c:76: undefined reference to `qemu_plugin_outs'
/usr/bin/ld: tests/plugin/libsyscall.so.p/syscall.c.o: in function `vcpu_syscall':
/home/cborntra/REPOS/qemu/build/../tests/plugin/syscall.c:55: undefined reference to `qemu_plugin_outs'
/usr/bin/ld: tests/plugin/libsyscall.so.p/syscall.c.o: in function `qemu_plugin_install':
/home/cborntra/REPOS/qemu/build/../tests/plugin/syscall.c:133: undefined reference to `qemu_plugin_register_vcpu_syscall_cb'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/syscall.c:134: undefined reference to `qemu_plugin_register_vcpu_syscall_ret_cb'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/syscall.c:135: undefined reference to `qemu_plugin_register_atexit_cb'
collect2: error: ld returned 1 exit status
[3/1472] Linking target tests/plugin/libinsn.so
FAILED: tests/plugin/libinsn.so
cc  -o tests/plugin/libinsn.so tests/plugin/libinsn.so.p/insn.c.o -Wl,--as-needed -Wl,--allow-shlib-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libinsn.so -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -m64 -Wl,--build-id -pie -Wl,-z,relro -Wl,-z,now -O2 -g -fPIE -DPIE -fstack-protector-strong -Wl,--export-dynamic -pthread -lgmodule-2.0 -lglib-2.0 -Wl,--end-group
/usr/bin/ld: /usr/lib/gcc/s390x-linux-gnu/9/../../../s390x-linux-gnu/Scrt1.o: in function `_start':
(.text+0x34): undefined reference to `main'
/usr/bin/ld: tests/plugin/libinsn.so.p/insn.c.o: in function `plugin_exit':
/home/cborntra/REPOS/qemu/build/../tests/plugin/insn.c:58: undefined reference to `qemu_plugin_outs'
/usr/bin/ld: tests/plugin/libinsn.so.p/insn.c.o: in function `vcpu_insn_exec_before':
/home/cborntra/REPOS/qemu/build/../tests/plugin/insn.c:29: undefined reference to `qemu_plugin_outs'
/usr/bin/ld: tests/plugin/libinsn.so.p/insn.c.o: in function `vcpu_tb_trans':
/home/cborntra/REPOS/qemu/build/../tests/plugin/insn.c:37: undefined reference to `qemu_plugin_tb_n_insns'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/insn.c:41: undefined reference to `qemu_plugin_tb_get_insn'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/insn.c:44: undefined reference to `qemu_plugin_register_vcpu_insn_exec_inline'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/insn.c:47: undefined reference to `qemu_plugin_insn_vaddr'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/insn.c:48: undefined reference to `qemu_plugin_register_vcpu_insn_exec_cb'
/usr/bin/ld: tests/plugin/libinsn.so.p/insn.c.o: in function `qemu_plugin_install':
/home/cborntra/REPOS/qemu/build/../tests/plugin/insn.c:69: undefined reference to `qemu_plugin_register_vcpu_tb_trans_cb'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/insn.c:70: undefined reference to `qemu_plugin_register_atexit_cb'
collect2: error: ld returned 1 exit status
[4/1472] Linking target tests/plugin/libmem.so
FAILED: tests/plugin/libmem.so
cc  -o tests/plugin/libmem.so tests/plugin/libmem.so.p/mem.c.o -Wl,--as-needed -Wl,--allow-shlib-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libmem.so -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -m64 -Wl,--build-id -pie -Wl,-z,relro -Wl,-z,now -O2 -g -fPIE -DPIE -fstack-protector-strong -Wl,--export-dynamic -pthread -lgmodule-2.0 -lglib-2.0 -Wl,--end-group
/usr/bin/ld: /usr/lib/gcc/s390x-linux-gnu/9/../../../s390x-linux-gnu/Scrt1.o: in function `_start':
(.text+0x34): undefined reference to `main'
/usr/bin/ld: tests/plugin/libmem.so.p/mem.c.o: in function `plugin_exit':
/home/cborntra/REPOS/qemu/build/../tests/plugin/mem.c:39: undefined reference to `qemu_plugin_outs'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/mem.c:39: undefined reference to `qemu_plugin_outs'
/usr/bin/ld: tests/plugin/libmem.so.p/mem.c.o: in function `vcpu_tb_trans':
/home/cborntra/REPOS/qemu/build/../tests/plugin/mem.c:60: undefined reference to `qemu_plugin_tb_n_insns'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/mem.c:64: undefined reference to `qemu_plugin_tb_get_insn'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/mem.c:72: undefined reference to `qemu_plugin_register_vcpu_mem_cb'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/mem.c:67: undefined reference to `qemu_plugin_register_vcpu_mem_inline'
/usr/bin/ld: tests/plugin/libmem.so.p/mem.c.o: in function `vcpu_mem':
/home/cborntra/REPOS/qemu/build/../tests/plugin/mem.c:47: undefined reference to `qemu_plugin_get_hwaddr'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/mem.c:48: undefined reference to `qemu_plugin_hwaddr_is_io'
/usr/bin/ld: tests/plugin/libmem.so.p/mem.c.o: in function `qemu_plugin_install':
/home/cborntra/REPOS/qemu/build/../tests/plugin/mem.c:109: undefined reference to `qemu_plugin_register_vcpu_tb_trans_cb'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/mem.c:110: undefined reference to `qemu_plugin_register_atexit_cb'
collect2: error: ld returned 1 exit status
[5/1472] Linking target tests/plugin/libbb.so
FAILED: tests/plugin/libbb.so
cc  -o tests/plugin/libbb.so tests/plugin/libbb.so.p/bb.c.o -Wl,--as-needed -Wl,--allow-shlib-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libbb.so -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -m64 -Wl,--build-id -pie -Wl,-z,relro -Wl,-z,now -O2 -g -fPIE -DPIE -fstack-protector-strong -Wl,--export-dynamic -pthread -lgmodule-2.0 -lglib-2.0 -Wl,--end-group
/usr/bin/ld: /usr/lib/gcc/s390x-linux-gnu/9/../../../s390x-linux-gnu/Scrt1.o: in function `_start':
(.text+0x34): undefined reference to `main'
/usr/bin/ld: tests/plugin/libbb.so.p/bb.c.o: in function `plugin_exit':
/home/cborntra/REPOS/qemu/build/../tests/plugin/bb.c:55: undefined reference to `qemu_plugin_outs'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/bb.c:55: undefined reference to `qemu_plugin_outs'
/usr/bin/ld: tests/plugin/libbb.so.p/bb.c.o: in function `vcpu_tb_trans':
/home/cborntra/REPOS/qemu/build/../tests/plugin/bb.c:84: undefined reference to `qemu_plugin_tb_n_insns'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/bb.c:87: undefined reference to `qemu_plugin_register_vcpu_tb_exec_inline'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/bb.c:89: undefined reference to `qemu_plugin_register_vcpu_tb_exec_inline'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/bb.c:93: undefined reference to `qemu_plugin_register_vcpu_tb_exec_cb'
/usr/bin/ld: tests/plugin/libbb.so.p/bb.c.o: in function `vcpu_idle':
/home/cborntra/REPOS/qemu/build/../tests/plugin/bb.c:66: undefined reference to `qemu_plugin_outs'
/usr/bin/ld: tests/plugin/libbb.so.p/bb.c.o: in function `qemu_plugin_install':
/home/cborntra/REPOS/qemu/build/../tests/plugin/bb.c:134: undefined reference to `qemu_plugin_register_vcpu_tb_trans_cb'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/bb.c:135: undefined reference to `qemu_plugin_register_atexit_cb'
/usr/bin/ld: /home/cborntra/REPOS/qemu/build/../tests/plugin/bb.c:131: undefined reference to `qemu_plugin_register_vcpu_idle_cb'
collect2: error: ld returned 1 exit status
[6/1472] Generating qemu-version.h with a meson_exe.py custom command
ninja: build stopped: subcommand failed.


  reply	other threads:[~2021-07-16 11:29 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-12 12:26 [PULL for 6.1 00/40] testing and plugin updates Alex Bennée
2021-07-12 12:26 ` [PULL 01/40] Jobs based on custom runners: documentation and configuration placeholder Alex Bennée
2021-07-12 12:26 ` [PULL 02/40] Jobs based on custom runners: build environment docs and playbook Alex Bennée
2021-07-12 12:26 ` [PULL 03/40] Jobs based on custom runners: docs and gitlab-runner setup playbook Alex Bennée
2021-07-12 12:26 ` [PULL 04/40] Jobs based on custom runners: add job definitions for QEMU's machines Alex Bennée
2021-07-12 12:26 ` [PULL 05/40] tests/tcg: also disable the signals test for plugins Alex Bennée
2021-07-12 12:26 ` [PULL 06/40] build: validate that system capstone works before using it Alex Bennée
2021-07-12 12:26 ` [PULL 07/40] gitlab: support for FreeBSD 12, 13 and macOS 11 via cirrus-run Alex Bennée
2021-07-12 12:26 ` [PULL 08/40] cirrus: delete FreeBSD and macOS jobs Alex Bennée
2021-07-12 12:26 ` [PULL 09/40] hw/usb/ccid: remove references to NSS Alex Bennée
2021-07-12 12:26 ` [PULL 10/40] tests/docker: don't use BUILDKIT in GitLab either Alex Bennée
2021-07-12 12:26 ` [PULL 11/40] tests/docker: use project specific container registries Alex Bennée
2021-07-12 12:26 ` [PULL 12/40] tests/docker: use explicit docker.io registry Alex Bennée
2021-07-12 12:26 ` [PULL 13/40] tests/docker: remove FEATURES env var from templates Alex Bennée
2021-07-12 12:26 ` [PULL 14/40] tests/docker: fix sorting in package lists Alex Bennée
2021-07-12 12:26 ` [PULL 15/40] tests/docker: fix mistakes in centos " Alex Bennée
2021-07-12 12:26 ` [PULL 16/40] tests/docker: fix mistakes in fedora package list Alex Bennée
2021-07-12 12:26 ` [PULL 17/40] tests/docker: fix mistakes in ubuntu package lists Alex Bennée
2021-07-12 12:26 ` [PULL 18/40] tests/docker: remove mingw packages from Fedora Alex Bennée
2021-07-12 12:26 ` [PULL 19/40] tests/docker: expand centos8 package list Alex Bennée
2021-07-12 12:26 ` [PULL 20/40] tests/docker: expand fedora " Alex Bennée
2021-07-12 12:26 ` [PULL 21/40] tests/docker: expand ubuntu1804 " Alex Bennée
2021-07-12 12:26 ` [PULL 22/40] tests/docker: expand ubuntu2004 " Alex Bennée
2021-07-12 12:26 ` [PULL 23/40] tests/docker: expand opensuse-leap " Alex Bennée
2021-07-12 12:26 ` [PULL 24/40] tests/vm: update NetBSD to 9.2 Alex Bennée
2021-07-12 12:26 ` [PULL 25/40] tests/vm: update openbsd to release 6.9 Alex Bennée
2021-07-12 12:26 ` [PULL 26/40] tests/tcg: make test-mmap a little less aggressive Alex Bennée
2021-07-12 12:26 ` [PULL 27/40] plugins: fix-up handling of internal hostaddr for 32 bit Alex Bennée
2021-07-12 12:26 ` [PULL 28/40] meson.build: move TCG plugin summary output Alex Bennée
2021-07-12 12:26 ` [PULL 29/40] configure: don't allow plugins to be enabled for a non-TCG build Alex Bennée
2021-07-12 12:26 ` [PULL 30/40] configure: add an explicit static and plugins check Alex Bennée
2021-07-12 12:26 ` [PULL 31/40] configure: stop user enabling plugins on Windows for now Alex Bennée
2021-07-12 12:26 ` [PULL 32/40] tcg/plugins: enable by default for most TCG builds Alex Bennée
2021-07-16  6:54   ` Christian Borntraeger
2021-07-16 11:28     ` Christian Borntraeger [this message]
2021-07-16 13:16       ` Alex Bennée
2021-07-16 14:51       ` Richard Henderson
2021-07-16 14:58         ` Christian Borntraeger
2021-07-16 15:31           ` Christian Borntraeger
2021-07-16 16:02             ` Richard Henderson
2021-07-12 12:26 ` [PULL 33/40] contrib/plugins: enable -Wall for building plugins Alex Bennée
2021-07-12 12:26 ` [PULL 34/40] contrib/plugins: add execlog to log instruction execution and memory access Alex Bennée
2021-07-12 12:26 ` [PULL 35/40] docs/devel: tcg-plugins: add execlog plugin description Alex Bennée
2021-07-12 12:26 ` [PULL 36/40] plugins: Added a new cache modelling plugin Alex Bennée
2021-07-12 12:26 ` [PULL 37/40] plugins/cache: Enable cache parameterization Alex Bennée
2021-07-12 12:26 ` [PULL 38/40] plugins/cache: Added FIFO and LRU eviction policies Alex Bennée
2021-07-12 12:26 ` [PULL 39/40] docs/devel: Added cache plugin to the plugins docs Alex Bennée
2021-07-12 12:26 ` [PULL 40/40] MAINTAINERS: Added myself as a reviewer for TCG Plugins Alex Bennée
2021-07-12 12:56 ` [PULL for 6.1 00/40] testing and plugin updates Alex Bennée
2021-07-12 14:51   ` Alex Bennée
2021-07-12 22:19   ` Alex Bennée

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a3f05bc9-808d-0572-3e17-df9cf9418b4e@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=alex.bennee@linaro.org \
    --cc=erdnaxe@crans.org \
    --cc=f4bug@amsat.org \
    --cc=ma.mandourr@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    --cc=willianr@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).