[cairo] gobject boxed types

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Tue Sep 16 13:56:30 PDT 2008


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 at 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



More information about the cairo mailing list