[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 27/29] plugins: make test/example plugins work on windows
From: |
Alex Bennée |
Subject: |
Re: [PATCH 27/29] plugins: make test/example plugins work on windows |
Date: |
Sat, 04 Nov 2023 09:14:08 +0000 |
User-agent: |
mu4e 1.11.24; emacs 29.1 |
=?UTF-8?q?Alex=20Benn=C3=A9e?= <alex.bennee@linaro.org> writes:
> From: Greg Manning <gmanning@rapitasystems.com>
>
> Generate a qemu_plugin_api.lib delay import lib on windows, for
> windows qemu plugins to link against.
>
> Implement an example dll load fail hook to link up the API functions
> correctly when a plugin is loaded on windows.
>
> Update the build scripts for the test and example plugins to use these
> things.
>
> Signed-off-by: Greg Manning <gmanning@rapitasystems.com>
> Acked-by: Alex Benn.©e <alex.bennee@linaro.org>
> Message-Id: <20231102172053.17692-3-gmanning@rapitasystems.com>
> Signed-off-by: Alex Benn.©e <alex.bennee@linaro.org>
> ---
> configure | 3 +++
> contrib/plugins/win32_linker.c | 34 ++++++++++++++++++++++++++++++++++
> contrib/plugins/Makefile | 20 ++++++++++++++++----
> plugins/meson.build | 17 +++++++++++++++++
> tests/plugin/meson.build | 14 +++++++++++---
> 5 files changed, 81 insertions(+), 7 deletions(-)
> create mode 100644 contrib/plugins/win32_linker.c
>
>
> if get_option('plugins')
> + if targetos == 'windows'
> + # Generate a .lib file for plugins to link against.
> + # First, create a .def file listing all the symbols a plugin should
> expect to have
> + # available in qemu
> + win32_plugin_def = configure_file(
> + input: files('qemu-plugins.symbols'),
> + output: 'qemu_plugin_api.def',
> + capture: true,
> + command: ['sed', '-e', '0,/^/s//EXPORTS/; s/[{};]//g', '@INPUT@'])
> + # then use dlltool to assemble a delaylib.
> + win32_qemu_plugin_api_lib = configure_file(
> + input: win32_plugin_def,
> + output: 'qemu_plugin_api.lib',
> + command: ['dlltool', '--input-def', '@INPUT@',
> + '--output-delaylib', '@OUTPUT@', '--dllname',
> 'qemu.exe']
We need to ensure we have dlltool available before enabling plugins for
windows otherwise we fail here. Also we need to update the windows
images to include it.
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
- Re: [PATCH 17/29] gdbstub: Simplify XML lookup, (continued)
[PATCH 28/29] plugins: disable lockstep plugin on windows, Alex Bennée, 2023/11/03
[PATCH 19/29] hw/core/cpu: Remove gdb_get_dynamic_xml member, Alex Bennée, 2023/11/03
[PATCH 29/29] plugins: allow plugins to be enabled on windows, Alex Bennée, 2023/11/03
[PATCH 21/29] gdbstub: expose api to find registers, Alex Bennée, 2023/11/03
[PATCH 24/29] plugins: add an API to read registers, Alex Bennée, 2023/11/03
[PATCH 27/29] plugins: make test/example plugins work on windows, Alex Bennée, 2023/11/03
- Re: [PATCH 27/29] plugins: make test/example plugins work on windows,
Alex Bennée <=
[PATCH 20/29] gdbstub: Add members to identify registers to GDBFeature, Alex Bennée, 2023/11/03
[PATCH 18/29] gdbstub: Infer number of core registers from XML, Alex Bennée, 2023/11/03