On 25/8/26 21:09, Marc-André Lureau wrote:
The wild linker rejects duplicate symbols even from archive members.
When qemu-storage-daemon links both libqmp (with monitor/monitor.c)
and libqemuutil (with stubs/monitor-core.c), all symbols from the
stub .o are pulled in, causing duplicates for monitor_cur,
monitor_set_cur, and qapi_event_emit.

Split each stub group into its own file so the linker only pulls in
archive members whose symbols are actually needed.

Signed-off-by: Marc-André Lureau <[email protected]>
---
  stubs/meson.build       |  2 ++
  stubs/monitor-core.c    | 16 ----------------
  stubs/monitor-cur.c     | 14 ++++++++++++++
  stubs/qapi-event-emit.c |  8 ++++++++
  4 files changed, 24 insertions(+), 16 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>

Reply via email to