From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uov1B-0001mi-3W for qemu-devel@nongnu.org; Tue, 18 Jun 2013 08:28:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uov18-000879-DQ for qemu-devel@nongnu.org; Tue, 18 Jun 2013 08:28:12 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:51110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uov18-00086P-5D for qemu-devel@nongnu.org; Tue, 18 Jun 2013 08:28:10 -0400 Message-ID: <51C05257.8020307@msgid.tls.msk.ru> Date: Tue, 18 Jun 2013 16:28:07 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <51C04671.8090305@msgid.tls.msk.ru> <51C04FC4.5000007@redhat.com> <51C0503C.6050601@msgid.tls.msk.ru> In-Reply-To: <51C0503C.6050601@msgid.tls.msk.ru> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] RFC: DSO (dynamic shared objects) support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: qemu-devel 18.06.2013 16:19, Michael Tokarev =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > 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 chanc= e >> to do it halfway portably without libtool. >=20 > Well, I think this is trivial really. >=20 > 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