On 16/03/2021 14.59, Markus Armbruster wrote:
util/yank.c and stubs/yank.c are both in libqemuutil.a, even though
their external symbols conflict. The linker happens to pick the
former. This links a bunch of unneeded code into the executables that
actually want the latter: qemu-io, qemu-img, qemu-nbd, and several
tests. Amazingly, none of them fails to link.
To fix this, the non-stub yank.c from sourceset util_ss to sourceset
qmp_ss. This requires moving it from util/ to monitor/.
In another patch ("tests: Use the normal yank code instead of stubs in
relevant tests"), Lukas now changed the tests to always explicitly link
against the real yank.c code. That makes me wonder whether we need the yank
stubs at all ... it's not that much code after all, and it's very much
self-contained without references to other files, so I think it should also
be ok if we simply always keep it in the utils library and ditch the stubs?
Thomas