From: Thomas Huth <thuth@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>, lukasstraub2@web.de
Subject: Re: [PATCH] yank: Avoid linking into executables that don't want it
Date: Tue, 23 Mar 2021 05:54:25 +0100 [thread overview]
Message-ID: <9c0e3310-f67b-1999-1725-c44aeae94537@redhat.com> (raw)
In-Reply-To: <20210316135907.3646901-1-armbru@redhat.com>
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
next prev parent reply other threads:[~2021-03-23 4:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 13:59 [PATCH] yank: Avoid linking into executables that don't want it Markus Armbruster
2021-03-16 14:06 ` Eric Blake
2021-03-16 15:34 ` Markus Armbruster
2021-03-16 14:07 ` Eric Blake
2021-03-16 15:36 ` Markus Armbruster
2021-03-17 20:50 ` Lukas Straub
2021-03-23 4:54 ` Thomas Huth [this message]
2021-03-23 9:43 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9c0e3310-f67b-1999-1725-c44aeae94537@redhat.com \
--to=thuth@redhat.com \
--cc=armbru@redhat.com \
--cc=lukasstraub2@web.de \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).