Re: [Qemu-devel] [RFC PATCH v5 4/6] module: implement module loading function

2013-09-11 Thread Fam Zheng
On Wed, 09/11 15:24, Peter Maydell wrote: > On 11 September 2013 06:38, Fam Zheng wrote: > > --- a/linux-user/main.c > > +++ b/linux-user/main.c > > @@ -34,6 +34,7 @@ > > #include "qemu/timer.h" > > #include "qemu/envlist.h" > > #include "elf.h" > > +#include > > > > char *exec_path; > > > >

Re: [Qemu-devel] [RFC PATCH v5 4/6] module: implement module loading function

2013-09-11 Thread Richard Henderson
On 09/11/2013 08:23 AM, Alex Bligh wrote: >> But it does suggest the default being DT_RUNPATH, overridable "near" >> the command-line via LD_RUN_PATH. > > Not quite sure what you are suggesting here. DT_RUNPATH is an elf > tag IIRC. Not sure what LD_RUN_PATH does. LD_LIBRARY_PATH affects > more th

Re: [Qemu-devel] [RFC PATCH v5 4/6] module: implement module loading function

2013-09-11 Thread Alex Bligh
--On 11 September 2013 08:06:20 -0700 Richard Henderson wrote: If we want dependencies between modules, we may well need to get the dynamic linker involved with the search directory. This would rule out any command-line, or monitor-line altering of the path. But it does suggest the defau

Re: [Qemu-devel] [RFC PATCH v5 4/6] module: implement module loading function

2013-09-11 Thread Richard Henderson
On 09/11/2013 07:10 AM, Alex Bligh wrote: > > > --On 11 September 2013 13:38:27 +0800 Fam Zheng wrote: > >> +switch (type) { >> +case MODULE_LOAD_BLOCK: >> +path = CONFIG_PREFIX "/qemu/block/"; >> +break; >> +case MODULE_LOAD_UI: >> +path = CONFIG_PREFIX "/qe

Re: [Qemu-devel] [RFC PATCH v5 4/6] module: implement module loading function

2013-09-11 Thread Paolo Bonzini
Il 11/09/2013 16:10, Alex Bligh ha scritto: > > > --On 11 September 2013 13:38:27 +0800 Fam Zheng wrote: > >> +switch (type) { >> +case MODULE_LOAD_BLOCK: >> +path = CONFIG_PREFIX "/qemu/block/"; >> +break; >> +case MODULE_LOAD_UI: >> +path = CONFIG_PREFIX "/

Re: [Qemu-devel] [RFC PATCH v5 4/6] module: implement module loading function

2013-09-11 Thread Alex Bligh
--On 11 September 2013 13:38:27 +0800 Fam Zheng wrote: +switch (type) { +case MODULE_LOAD_BLOCK: +path = CONFIG_PREFIX "/qemu/block/"; +break; +case MODULE_LOAD_UI: +path = CONFIG_PREFIX "/qemu/ui/"; +break; +case MODULE_LOAD_NET: +path

Re: [Qemu-devel] [RFC PATCH v5 4/6] module: implement module loading function

2013-09-11 Thread Peter Maydell
On 11 September 2013 06:38, Fam Zheng wrote: > --- a/linux-user/main.c > +++ b/linux-user/main.c > @@ -34,6 +34,7 @@ > #include "qemu/timer.h" > #include "qemu/envlist.h" > #include "elf.h" > +#include > > char *exec_path; > > @@ -3551,6 +3552,8 @@ int main(int argc, char **argv, char **envp)

Re: [Qemu-devel] [RFC PATCH v5 4/6] module: implement module loading function

2013-09-11 Thread Paolo Bonzini
Il 11/09/2013 07:38, Fam Zheng ha scritto: > Added three types of modules: > > typedef enum { > MODULE_LOAD_BLOCK = 0, > MODULE_LOAD_UI, > MODULE_LOAD_NET, > MODULE_LOAD_MAX, > } module_load_type; If you want to make spice into a module, you probably need a