This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: KDE hackers, please read (was [nathan@codesourcery.com: Re: GCC 3.0.3: Bugs to Fix]) (fwd)
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Waldo Bastian <bastian at kde dot org>
- Cc: Joe Buck <jbuck at synopsys dot com>, Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>, kde-core-devel at mail dot kde dot org, gcc at gcc dot gnu dot org
- Date: Mon, 10 Dec 2001 09:44:33 +0000
- Subject: Re: KDE hackers, please read (was [nathan@codesourcery.com: Re: GCC 3.0.3: Bugs to Fix]) (fwd)
- Organization: Codesourcery LLC
- References: <200112042250.OAA02613@atrus.synopsys.com> <200112100729.fBA7TSl18050@linux.local>
Waldo Bastian wrote:
>
> On Tuesday 04 December 2001 02:50 pm, Joe Buck wrote:
> > > The alternative, banning RTTI from KDE, isn't very attractive either.
> >
> > What if you only use RTLD_GLOBAL for those libraries that define base
> > classes that you'll want to do RTTI with? Or use it everywhere except
> > with libraries that you know are problematic and sloppy with name spaces,
> > like the flash plugin and OpenGL.
>
> The problem that we had was with things like templates. If two plugins use the
> same template, they will get the same symbol-names. When the symbols are
> loaded in the global namespace, it can happen that plugin A resolves against
> the symbols of plugin B. When you now unload plugin B you will get a crash
> the next time you access plugin A.
Isn't this a bug in the DL machinery. Why can't it track the dependency
DAG? (or is unloading specifically undefined in such a case?)
> To what _extent_ does linking without RTLD_GLOBAL break RTTI? Looking at
> PR3993 breakage there seems to happen because the module that does the
> dlopen'ing doesn't strongly define class B (how do you call that, "class B
> isn't being emitted"?) That situation could be prevented most of the time I
> think. (I believe such classes also have a negative impact on prelinking)
Not saying RTLD_GLOBAL (and linking the main executable with -E), effectively
places each dlopen'd library in its own namespace. RTTI across library
boundaries would not work.
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org