From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UousR-00077D-Nd for qemu-devel@nongnu.org; Tue, 18 Jun 2013 08:19:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UousQ-0005JS-Hw for qemu-devel@nongnu.org; Tue, 18 Jun 2013 08:19:11 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:33192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UousQ-0005JH-As for qemu-devel@nongnu.org; Tue, 18 Jun 2013 08:19:10 -0400 Message-ID: <51C0503C.6050601@msgid.tls.msk.ru> Date: Tue, 18 Jun 2013 16:19:08 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <51C04671.8090305@msgid.tls.msk.ru> <51C04FC4.5000007@redhat.com> In-Reply-To: <51C04FC4.5000007@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: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. Thanks, /mjt