[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading |
Date: |
Wed, 18 Sep 2013 13:45:10 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
Il 17/09/2013 07:40, Richard Henderson ha scritto:
> On 09/16/2013 06:29 PM, Fam Zheng wrote:
>>> Link spice-qemu.char.so against spice-core.so. The DT_NEEDED entry will be
>>> recorded, and ld.so will do the right thing.
>>>
>>> Anything else sounds way too much like Not Invented Here.
>>>
>> How to do the symbol checking as above if spice-core.so is automatically
>> loaded
>> by ld.so?
>
> You're checking the version stamp in spice-char.so. I'd think that's good
> enough. No need to transitively check.
>
>> And we will need to add $moddir to LD_LIBRARY_PATH and lose the restriction
>> of
>> modules directory too.
>
> Or add DT_RUN_PATH to the main executable, or even add DT_RUN_PATH to the
> module itself. In particular, link the module with
>
> -Wl,--enable-new-dtags -Wl,-rpath,'$ORIGIN'
>
> and dependencies for the module will automatically be looked for in the
> directory in which the module is found. Which is almost certiainly the only
> thing that we want -- all modules in the same directory.
This is not portable.
It looks like it can be emulated on Windows using LoadLibraryEx with the
LOAD_WITH_ALTERED_SEARCH_PATH flag and passing an absolute path to the
shared library.
But on Mac OS X a bundle (module loaded with dlopen) cannot have a
dependency on another bundle, afaik.
Paolo
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, (continued)
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Daniel P. Berrange, 2013/09/16
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Paolo Bonzini, 2013/09/16
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Daniel P. Berrange, 2013/09/16
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Paolo Bonzini, 2013/09/16
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Fam Zheng, 2013/09/16
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Paolo Bonzini, 2013/09/16
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Fam Zheng, 2013/09/16
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Richard Henderson, 2013/09/16
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Fam Zheng, 2013/09/16
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Richard Henderson, 2013/09/17
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Richard Henderson, 2013/09/18
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Paolo Bonzini, 2013/09/18
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Wenchao Xia, 2013/09/17
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Gerd Hoffmann, 2013/09/16
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Paolo Bonzini, 2013/09/16
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Richard Henderson, 2013/09/16
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Alex Bligh, 2013/09/16
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Paolo Bonzini, 2013/09/16
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Alex Bligh, 2013/09/16
- Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading, Daniel P. Berrange, 2013/09/16