Re: linking / performance / interposing detection ...
- From: michael meeks <michael meeks novell com>
- To: Federico Mena Quintero <federico novell com>
- Cc: Gtk Hackers <gtk-devel-list gnome org>, Alex Larsson <alexl redhat com>
- Subject: Re: linking / performance / interposing detection ...
- Date: Tue, 13 Dec 2005 20:58:11 -0000
On Tue, 2005-12-13 at 12:16 -0600, Federico Mena Quintero wrote:
> > So - as part of my -Bdirect work - trying to detect genuine cases of
> > interposing - I ran my simple perl script over all my gnome libraries:
> > http://go-oo.org/ooo-build/bin/finterpose (for which I attach the gnome
> > specific exclusions file [this incidentally shows lots of other bad
> > behavior in Gnome ;-]):
>
> Very neat. How do interposed symbols happen ?
2 libraries export a symbol with the same name; whomever is dlopened'
first (if opened into the global scope) wins & subsequent uses of that
name point to the 1st instance. Of course a shared 'free_list' [ cf. the
JDK & libcddb ] is most likely not going to work across different
implementations ;-)
> Is it just people forgetting to put a "static" somewhere? That seems
> to be the case for parent_class in metal_gtk2_engine.c.
Sure - often that's the case. Ideally every exported symbol should be
namespaced - and/or preferably a linker-map used such that ~no symbols
but for the gtk_module_init_foo or whatever are exported. Run objdump -T
on the library & consider if you really want other people using /
conflicting with the result :-)
> Yes, we can load any number of theme engines simultaneously.
> Fortunately no one cooks gtkrc files that are so fucked up to actually
> do this :)
I just wonder how clean theme switching is - if you switch from a -> b
-> c -> a eg. do we unload them ?
> Makes sense. I'm patching gtk-engines right now for the "static"s; it
> would be good to file bugs for the other modules which need BIND_LOCAL
> changes.
Sure - I guess Alex nailed nautilus & gnome-vfs - which both heavily
use plugin libs; presumably pango likes modules, I've poked the
gstreamer guys separately. Hopefully if you load with BIND_LOCAL you
don't introduce eg. libjpeg / libpng etc. into the global symbol search
path.
HTH,
Michael.
--
michael meeks novell com <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]