Re: linking / performance / interposing detection ...



On Tue, 2005-12-13 at 12:16 -0600, Federico Mena Quintero wrote:
> Very neat.  How do interposed symbols happen?  Is it just people
> forgetting to put a "static" somewhere?  That seems to be the case for
> parent_class in metal_gtk2_engine.c.

Bah, I see now that it is more complicated.  The various .c files in the
metal engine do share the parent_class variable - it can't be made
static.

I'm thinking of adding this:

 typedef enum
 {
   G_MODULE_BIND_LAZY	= 1 << 0,
   G_MODULE_BIND_LOCAL	= 1 << 1,
   G_MODULE_BIND_MASK	= 0x03
+  G_MODULE_BIND_PLUGIN = G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL
 } GModuleFlags;

and recommending in the docs that people use G_MODULE_BIND_PLUGIN for
"load a plugin" uses of g_module_open().

Thoughts?

  Federico




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