public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@codesourcery.com>
To: Waldo Bastian <bastian@kde.org>, Dirk Mueller <dmuell@gmx.net>
Cc: kde-core-devel@mail.kde.org, gcc@gcc.gnu.org
Subject: Re: KDE hackers, please read (was [nathan@codesourcery.com: Re: GCC  3.0.3: Bugs to Fix]) (fwd)
Date: Wed, 05 Dec 2001 01:23:00 -0000	[thread overview]
Message-ID: <3C0DE772.2831F884@codesourcery.com> (raw)
In-Reply-To: <200112042117.fB4LHCl03492@linux.local>

Waldo Bastian wrote:

> That's pretty bad because loading (dlopen'ing) parts with RTLD_GLOBAL is
> asking for trouble. There is no way that we can guarantee that one part
> doesn't by chance use the same name for some class/symbols as another part,
> since parts may get developed independently of each other.
> 
> We are already running into trouble with the flash plugin colliding with
> OpenGL (both define "DisplayList") and things like this aren't helping the
> situation.
Other than reiterating what Joe Buck said, what you describe sounds
like a job for namespaces. Ok, so you'd have to retrofit them - but
you've got to do something retroactively anyway.  If you cannot do that
then you might be able to do some linker symbol remapping. For instance,
a) all the classes you wish to be dcastable/throwable across shared library
boundaries should be placed in the 'ReallyGlobal' namespace (for want of a
better name :-)
b) when building the shared library prefix any symbol which is not an
export or import to/from the library and not in the ReallyGlobal namespace
with 'PrivateToLibFoo'

That sounds tricky to me, but as Joe pointed out - you've broken the one
definition rule and 'magically' want the compilation system to know which
multiply defined objects are the same and which are different.

Dirk Mueller wrote:
> Point taken for the RTLD_GLOBAL part, but why do we need RTLD_NOW in order
> to make RTTI work, as the original posting pointed out ?
You should be able to do it lazily too.

But, RTLD_GLOBAL doesn't work on (at least) gnu.linux i86 (see gcc bug 4993).
I've not had time to investigate further, but aim to do so shortly.

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

      parent reply	other threads:[~2001-12-05  9:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.42.0112041339390.30216-110000@bochum.stuttgart.redhat.com>
2001-12-04 13:21 ` Waldo Bastian
2001-12-04 13:29   ` shaheed
2001-12-04 14:51   ` Joe Buck
2001-12-04 16:37     ` Dirk Mueller
2001-12-05 12:16       ` Mark Mitchell
2001-12-09 23:58     ` Waldo Bastian
2001-12-10  0:52       ` Simon Hausmann
2001-12-10  2:45         ` Lubos Lunak
2001-12-10  9:55           ` Mark Mitchell
2001-12-10 11:16             ` KDE hackers, please read (was [nathan@codesourcery.com: Re: GCC Joe Buck
2001-12-10 11:39               ` Mark Mitchell
2001-12-10 11:47                 ` Joe Buck
2001-12-11 13:00             ` KDE hackers, please read (was [nathan@codesourcery.com: Re: GCC 3.0.3: Bugs to Fix]) (fwd) Alexandre Oliva
2001-12-11  9:28               ` Mark Mitchell
2001-12-10  1:33       ` Richard Henderson
2001-12-10  2:41         ` Andreas Schwab
2001-12-10  2:07       ` Nathan Sidwell
2001-12-10  3:01       ` Jakub Jelinek
2001-12-05  1:23   ` Nathan Sidwell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C0DE772.2831F884@codesourcery.com \
    --to=nathan@codesourcery.com \
    --cc=bastian@kde.org \
    --cc=dmuell@gmx.net \
    --cc=gcc@gcc.gnu.org \
    --cc=kde-core-devel@mail.kde.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).