Plugin using user code functions fails with undefined symbol.
Host environment
- Operating system: Fedora 41
- OS/kernel version:
- Architecture: x86_64
- QEMU flavor: All
- QEMU version: v10.0.2
- QEMU command line:
Build and run libdrcov.so plugin
Emulated/Virtualized environment
- Operating system:
- OS/kernel version:
- Architecture:
Description of problem
Using plugins depending on user common-user code won't run after building. They fail with undefined symbol for the functions using user code directly. E.g. the qemu_plugin_path_to_binary() function.
Steps to reproduce
# Simple configure and build
> ../configure --enable-plugins --target-list=sparc-linux-user,sparc64-linux-user && ninja
# Run some binary with the plugin
> ./qemu-sparc64 -plugin file=./contrib/plugins/libdrcov.so -d plugin <some_bin>
qemu-sparc64: Could not load plugin ./contrib/plugins/libdrcov.so: ./contrib/plugins/libdrcov.so: undefined symbol: qemu_plugin_path_to_binary
Additional information
- It is notable that I can't find any tests with this function.
- Also there doesn't seem any dependency declared between plugins and
linux-user/bsd-user.
Edited by Rot 127