From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VK5Yn-0003cf-Ne for qemu-devel@nongnu.org; Thu, 12 Sep 2013 07:59:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VK5Yi-00024o-Rx for qemu-devel@nongnu.org; Thu, 12 Sep 2013 07:59:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9974) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VK5Yi-00024Y-Iy for qemu-devel@nongnu.org; Thu, 12 Sep 2013 07:59:40 -0400 Message-ID: <5231ACA2.50500@redhat.com> Date: Thu, 12 Sep 2013 05:59:30 -0600 From: Eric Blake MIME-Version: 1.0 References: <1378906448-15834-1-git-send-email-famz@redhat.com> <1378906448-15834-5-git-send-email-famz@redhat.com> <20130911154841.GD2293@redhat.com> <5230BA69.1000202@twiddle.net> <20130912030232.GK9134@T430s.nay.redhat.com> <523152EB.5010505@msgid.tls.msk.ru> In-Reply-To: <523152EB.5010505@msgid.tls.msk.ru> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Lh5oMmBQdgFSMud3bXsd4EaHPmAA8atBb" Subject: Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: peter.maydell@linaro.org, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, pbonzini@redhat.com, vilanova@ac.upc.edu, Richard Henderson This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Lh5oMmBQdgFSMud3bXsd4EaHPmAA8atBb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/11/2013 11:36 PM, Michael Tokarev wrote: >=20 > A solution which I proposed at the very beginning -- to export > a "hashed" init function from modules, and call it from the > main executable. Like, instead of, say, qemu_module_init(), > call qemu_module_init_0xdeadbeaf(), where 0xdeadbeaf is a > hash of some build-dependent value. This should be enough > to keep it going. And of course, since we store sources in git, you already have such a hash value at your disposal: $CC -DBUILD_HASH=3D$(git rev-parse HEAD) ... coupled with glue(qemu_module_init_, BUILD_HASH) where the only trick is to figure out how to bake in a hash when building from a released tarball rather than git. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Lh5oMmBQdgFSMud3bXsd4EaHPmAA8atBb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSMayiAAoJEKeha0olJ0Nq7W0H/RbEomrXewoxyLGm77+6B28g e8qpmeavE0F3pcdl0yVZFDADuy9IkJyalDRB80A7xYOEOBmWocWnBBR2Sw2G2sT2 1K1/W8m9iGffjWATlRxWwgmESw7yClgHnzbru6Fu4BJNYmeiudD1znVUjM6BdPb9 p9kyuME9mKD5obJetO1DfE0xQOWlUT7Ld5W7bj5EJwQkyMYu8e0OCK9NWVmuZWoS J082TwjdTVD29oOXan8Qe+XfJqsFkQSF5qcAhA5seZcJAmZFwXMaDj7TFdN3HzmW 4KzeF7LNnO1oxH5HVvrJ+b7B6Nv6tgeeyk7z58V1BxjqJ1EZ8+wQJ4AHjg/Tf3g= =XPyU -----END PGP SIGNATURE----- --Lh5oMmBQdgFSMud3bXsd4EaHPmAA8atBb--