[cairo] gobject boxed types

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Tue Sep 16 14:07:26 PDT 2008

On Tue, 2008-09-16 at 13:56 -0700, Mathieu Lacage wrote:
> 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

I should have pointed out that the converse is not true. i.e., it is
possible to open a library with RTLD_LOCAL first and promote that to
RTLD_GLOBAL by re-dl_opening it with the RTLD_GLOBAL switch (but once it
is done, you can't go back to RTLD_LOCAL). 

This is a bit OT though.


More information about the cairo mailing list