From: Michael Tokarev <mjt@tls.msk.ru>
To: Laszlo Ersek <lersek@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] RFC: DSO (dynamic shared objects) support
Date: Tue, 18 Jun 2013 16:28:07 +0400 [thread overview]
Message-ID: <51C05257.8020307@msgid.tls.msk.ru> (raw)
In-Reply-To: <51C0503C.6050601@msgid.tls.msk.ru>
18.06.2013 16:19, Michael Tokarev пишет:
> 18.06.2013 16:17, Laszlo Ersek wrote:
>> On 06/18/13 13:37, Michael Tokarev wrote:
>>
>>> Next, and this is the most complex part. The build system for
>>> modules, and configuring it. I heard there were plans to use
>>> something like kbuild system for that, has anything been done
>>> in this context?
>>
>> Sorry for responding separately... Some module/symbol versioning will be
>> necessary, as the binding will be delayed until runtime, and users
>> *will* mix and match qemu and modules, and get random crashes. AFAIK
>> versioning is a good way to avoid that (you would get an error in
>> dlopen(), and dlerror() would pinpoint problem).
>>
>> No idea how to implement this though, except I expect there's no chance
>> to do it halfway portably without libtool.
>
> Well, I think this is trivial really.
>
> Duding build, we re-#define register_module_init() to have a version
> number (or even a build id), for example register_module_init_1_6_0().
> This is a function which each plugin will call inside its constructor.
> Being unable to find this symbol in calling qemu it will fail to load.
$ ./x86_64-softmmu/qemu-system-x86_64 -hda http://foo/bar
warning: unable to load plugin plugins/block_curl.so: plugins/block_curl.so: undefined symbol: register_module_init_1_6_0
qemu-system-x86_64: -hda http://foo/bar: could not open disk image http://foo/bar: No such file or directory
Looks clear enough.
Also, we may add version number to the plugin name too.
/mjt
next prev parent reply other threads:[~2013-06-18 12:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-18 11:37 [Qemu-devel] RFC: DSO (dynamic shared objects) support Michael Tokarev
2013-06-18 12:05 ` Laszlo Ersek
2013-06-18 13:06 ` Paolo Bonzini
2013-06-18 12:17 ` Laszlo Ersek
2013-06-18 12:19 ` Michael Tokarev
2013-06-18 12:28 ` Michael Tokarev [this message]
2013-06-18 20:15 ` Daniel P. Berrange
2013-06-18 21:40 ` Richard Henderson
2013-06-18 12:42 ` Anthony Liguori
2013-06-18 13:12 ` Peter Maydell
2013-06-18 13:32 ` Paolo Bonzini
2013-06-18 13:13 ` Paolo Bonzini
2013-06-18 20:19 ` Daniel P. Berrange
2013-06-18 21:34 ` Peter Maydell
2013-06-18 19:35 ` Richard Henderson
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=51C05257.8020307@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=lersek@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.