qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] yank: Avoid linking into executables that don't want it


From: Thomas Huth
Subject: Re: [PATCH] yank: Avoid linking into executables that don't want it
Date: Tue, 23 Mar 2021 05:54:25 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]