qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading functio


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading function
Date: Thu, 12 Sep 2013 05:59:30 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

On 09/11/2013 11:36 PM, Michael Tokarev wrote:
> 
> 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=$(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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]