From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMJFS-0000RW-E2 for qemu-devel@nongnu.org; Wed, 18 Sep 2013 11:01:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMJFL-00039c-IN for qemu-devel@nongnu.org; Wed, 18 Sep 2013 11:00:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMJFL-00039R-3i for qemu-devel@nongnu.org; Wed, 18 Sep 2013 11:00:51 -0400 Message-ID: <5239C00F.4060607@redhat.com> Date: Wed, 18 Sep 2013 17:00:31 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20130916095121.GD22783@T430s.nay.redhat.com> <5236D8EB.9060700@redhat.com> <20130916101415.GH6005@redhat.com> <5236DB0E.5040302@redhat.com> <20130916102131.GI6005@redhat.com> <5236DDC7.1010908@redhat.com> <20130916112917.GA21374@T430s.nay.redhat.com> <5236EC72.20900@redhat.com> <20130916114641.GA22477@T430s.nay.redhat.com> <523786DD.5020406@twiddle.net> <20130917012910.GB3362@T430s.nay.redhat.com> <5237EB64.9030206@twiddle.net> <52399246.4090600@redhat.com> <5239BC59.5000201@twiddle.net> In-Reply-To: <5239BC59.5000201@twiddle.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v10 5/8] module: implement module loading List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: peter.maydell@linaro.org, famz@redhat.com, mjt@tls.msk.ru, qemu-devel@nongnu.org, alex@alex.org.uk, vilanova@ac.upc.edu Il 18/09/2013 16:44, Richard Henderson ha scritto: > On 09/18/2013 04:45 AM, Paolo Bonzini wrote: >> But on Mac OS X a bundle (module loaded with dlopen) cannot have a >> dependency on another bundle, afaik. > > The documentation for NSAddImage suggests that they can: > >> NSADDIMAGE_OPTION_WITH_SEARCHING >> With this option, the image_name passed for the library and all its >> dependents is affected by the various dyld environment variables as if this >> library were linked into the program. > > Note "and all its dependents". The module can have shared libraries as dependencies. IIRC it cannot have other modules. But perhaps as you wrote yesterday the SPICE core can be built as a shared library (i.e. compiled with -shared and linked to a .dylib file). > Failing that, it appears that explicit control over search paths can be had > from Objective C, via the NSBundle class. Everything you can do in ObjC you can also do in C with the corresponding CoreFoundation library, in this case CFBundle, but it looks like "that" bundle is a different thing than a Mach-O bundle. It is a directory that the UI shows as if it were a single file. WTH... > Something for someone who actually cares about macosx to work on. Sure, at this point making Mac OS X not support modules actually makes sense. ELF and Windows seem to be okay. Paolo