Message ID | 20250225110844.3296991-1-alex.bennee@linaro.org (mailing list archive) |
---|---|
Headers | show |
Series | plugins: reduce total number of build objects | expand |
Hi Alex, On 2/25/25 03:08, Alex Bennée wrote: > As we move towards a more modular build this series converts both > loader and api to build once objects. For both objects the only real > difference is between user mode and system emulation so those bits > have been hived off into those source sets. > > The remaining core plugin is more intimately aligned with the TCG > backend so requires definitions like TCG_TARGET_LONG. Hopefully this > can been cleaned up once Richards TCG rationalisation code is added. > > Please review. > > Alex. > > Alex Bennée (10): > plugins/api: use tcg_ctx to get TARGET_PAGE_MASK > plugins/loader: populate target_name with target_name() > include/qemu: plugin-memory.h doesn't need cpu-defs.h > plugins/api: clean-up the includes > plugins/plugin.h: include queue.h > plugins/loader: compile loader only once > plugins/api: split out binary path/start/end/entry code > plugins/api: split out the vaddr/hwaddr helpers > plugins/api: split out time control helpers > plugins/api: build only once > for all the series: Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Additionnally, I would suggest to go further and merge functions for system and user mode, by checking at runtime what is the mode, by introducing a helper function for that. This way, all files can be really linked together, without having to select a different set of sources depending on which binary is built. Regards, Pierrick > include/qemu/plugin-memory.h | 1 - > plugins/plugin.h | 7 ++ > linux-user/plugin-api.c | 43 +++++++++ > plugins/api-system.c | 131 +++++++++++++++++++++++++++ > plugins/api-user.c | 57 ++++++++++++ > plugins/api.c | 170 +---------------------------------- > plugins/loader.c | 15 +--- > plugins/system.c | 24 +++++ > plugins/user.c | 19 ++++ > linux-user/meson.build | 1 + > plugins/meson.build | 8 +- > 11 files changed, 292 insertions(+), 184 deletions(-) > create mode 100644 linux-user/plugin-api.c > create mode 100644 plugins/api-system.c > create mode 100644 plugins/api-user.c > create mode 100644 plugins/system.c > create mode 100644 plugins/user.c >