qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 32/40] tcg/plugins: enable by default for most TCG builds


From: Christian Borntraeger
Subject: Re: [PULL 32/40] tcg/plugins: enable by default for most TCG builds
Date: Fri, 16 Jul 2021 13:28:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0



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 via email to

[Prev in Thread] Current Thread [Next in Thread]