Re: [cairo] gobject boxed types



On Tue, 2008-09-16 at 15:45 -0400, Havoc Pennington wrote:
> Hi,
> 
> On Mon, Sep 15, 2008 at 7:46 AM, Alexander Larsson <alexl redhat com> wrote:
> > If you dlopen cairo-glib and use RTLD_LOCAL I think you avoid the symbol
> > lookup overhead. Maybe this is useful?
> >
> 
> It breaks to RTLD_LOCAL something that's also linked to, since you get
> two copies of the lib (two copies of static variables for example) - I
> think anyway. So RTLD_LOCAL is only usable for true plugins/modules.

RTLD_LOCAL will not reload the library if it has been loaded already. If
the library has already been loaded _without_ RTLD_LOCAL (most likely,
you linked against it explicitely), then, RTLD_LOCAL is ignored, no
error is reported and the loader will return a handle to the
previously-loaded library (it increments its refcount) whose symbols are
RTLD_GLOBAL.

Mathieu



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