This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66830] Problem with C++ unique symbols in plugins
- From: "carlos at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 31 Mar 2016 01:52:35 +0000
- Subject: [Bug c++/66830] Problem with C++ unique symbols in plugins
- Auto-submitted: auto-generated
- References: <bug-66830-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66830
Carlos O'Donell <carlos at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |carlos at redhat dot com
--- Comment #4 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to pleuba from comment #3)
> Is this problem/behavior referenced or documented somewhere? I did not find
> any explanation on the internet.
>
> It take me some time to understand it, and if we can avoid others to spend
> this time too.
>
> Are they any plans to fix this or disable unique symbols by default ?
The dynamic loader could mark all users of an STB_GNU_UNIQUE symbol as
RTLD_NODELETE. It seems like the only answer.
That would mean you can't unload any of your plugins, and would make using C++
for dynamic plugin work very difficult. A long-running process could never
change these plugins. The author of the plugins would have to understand
intimate ABI details to write unloadable plugins or use another language that
doesn't have these problems.