[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading |
Date: |
Tue, 14 Jan 2014 11:21:19 +0800 |
User-agent: |
Mutt/1.5.22 (2013-10-16) |
On Mon, 01/13 22:05, Peter Maydell wrote:
> On 13 January 2014 16:59, Paolo Bonzini <address@hidden> wrote:
> > From: Fam Zheng <address@hidden>
> >
> > This patch adds loading, stamp checking and initialization of modules.
> >
> > The init function of dynamic module is no longer directly called as
> > __attribute__((constructor)) in static linked version, it is called
> > only after passed the checking of presense of stamp symbol:
> >
> > qemu_stamp_$(date +%s$$$RANDOM)
> >
>
> > +echo "CONFIG_STAMP=`date +%s`_$$_$RANDOM" >> $config_host_mak
>
> This is not really a good idea because $RANDOM is a bashism
> and our configure script is a generic POSIX shell script. In
> particular if you configure on Ubuntu you're likely to find that /bin/sh
> is dash and $RANDOM silently expands to the empty string.
>
> (One day I will clean up the tempfile generation stuff to fix
> its misuse of $RANDOM...)
>
So what's the best way to generate random number here?
> > +void DSO_STAMP_FUN(void);
> > +/* For error message, this function is an identification of qemu module */
>
> What is this comment trying to say?
Existence of this symbol indicates it *is* a qemu module. Where we continue to
check for existence of DSO_STAMP_FUN, and report it's only the wrong version.
Thanks,
Fam
- [Qemu-devel] [PATCH v15 0/9] Shared library module support, Paolo Bonzini, 2014/01/13
- [Qemu-devel] [PATCH v15 1/9] rules.mak: fix $(obj) to a real relative path, Paolo Bonzini, 2014/01/13
- [Qemu-devel] [PATCH v15 2/9] rules.mak: allow per object cflags and libs, Paolo Bonzini, 2014/01/13
- [Qemu-devel] [PATCH v15 3/9] block: use per-object cflags and libs, Paolo Bonzini, 2014/01/13
- [Qemu-devel] [PATCH v15 4/9] darwin: do not use -mdynamic-no-pic, Paolo Bonzini, 2014/01/13
- [Qemu-devel] [PATCH v15 5/9] build-sys: introduce common-obj-m and block-obj-m for DSO, Paolo Bonzini, 2014/01/13
- [Qemu-devel] [PATCH v15 6/9] module: implement module loading, Paolo Bonzini, 2014/01/13
- Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading, Peter Maydell, 2014/01/13
- Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading,
Fam Zheng <=
- Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading, Peter Maydell, 2014/01/13
- Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading, Richard Henderson, 2014/01/13
- Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading, Fam Zheng, 2014/01/13
- Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading, Richard Henderson, 2014/01/14
- Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading, Paolo Bonzini, 2014/01/14
- Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading, Peter Maydell, 2014/01/14
- Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading, Paolo Bonzini, 2014/01/14
- Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading, Richard Henderson, 2014/01/14
- Re: [Qemu-devel] [PATCH v15 6/9] module: implement module loading, Daniel P. Berrange, 2014/01/14