public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/21405] Template inlines have global visibility
       [not found] <bug-21405-10578@http.gcc.gnu.org/bugzilla/>
@ 2005-12-30 18:20 ` pinskia at gcc dot gnu dot org
  2006-03-20 17:07 ` cristipp at excite dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-30 18:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pinskia at gcc dot gnu dot org  2005-12-30 18:20 -------
There is an one defintion rule in C++ unlike most other languages which have
weak symbols.  And if you are working around it by using hidden symbols well
you are asking to run into troubles.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405



^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libstdc++/21405] Template inlines have global visibility
       [not found] <bug-21405-10578@http.gcc.gnu.org/bugzilla/>
  2005-12-30 18:20 ` [Bug libstdc++/21405] Template inlines have global visibility pinskia at gcc dot gnu dot org
@ 2006-03-20 17:07 ` cristipp at excite dot com
  2006-03-20 17:30 ` hjl at lucon dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: cristipp at excite dot com @ 2006-03-20 17:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from cristipp at excite dot com  2006-03-20 17:07 -------
(In reply to comment #11)
> There is an one defintion rule in C++ unlike most other languages which have
> weak symbols.  And if you are working around it by using hidden symbols well
> you are asking to run into troubles.

I don't believe that C++ has to say (should say) anything that pertains to
shared libraries. Moreover, symbol versions were added as workarounds for
problems created by the ELF format semantics. This is a platform specific
problem, not a pure C++ problem. However, to have the gnu toolchain to properly
support C++ on ELF platforms, adding proper versioning for *all* symbols,
including template-originated symbols is a must. I'm not sure if this is a task
for g++ of for the linker or for both, but someone should eventually
acknowledge that there is a problem and start looking for solutions...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libstdc++/21405] Template inlines have global visibility
       [not found] <bug-21405-10578@http.gcc.gnu.org/bugzilla/>
  2005-12-30 18:20 ` [Bug libstdc++/21405] Template inlines have global visibility pinskia at gcc dot gnu dot org
  2006-03-20 17:07 ` cristipp at excite dot com
@ 2006-03-20 17:30 ` hjl at lucon dot org
  2006-03-20 18:32 ` cristipp at excite dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: hjl at lucon dot org @ 2006-03-20 17:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from hjl at lucon dot org  2006-03-20 17:30 -------
FWIW, the current GNU binutils and glibc treat the weak definition in
shared libraries as strong. There is even a whole set of testsuite for
this in the GNU binutils.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libstdc++/21405] Template inlines have global visibility
       [not found] <bug-21405-10578@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2006-03-20 17:30 ` hjl at lucon dot org
@ 2006-03-20 18:32 ` cristipp at excite dot com
  2006-03-20 19:34 ` pluto at agmk dot net
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: cristipp at excite dot com @ 2006-03-20 18:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from cristipp at excite dot com  2006-03-20 18:32 -------
The problem is not how the dynamic linker treats 'weak' symbols. The problem is
that template originating functions having no version numbers. It just happen
that template originating functions are also marked as weak (if I understand
correctly). In other words, if I have a regular C/C++ function, I can attach
version strings to it, whereas it I have a C++ template function I cannot
attach version strings to it, or more precisely to instances of it. I don't
really care whether symbols are 'weak' or 'strong', I only care of proper
versioning for *all* C++ symbols.

I believe that this situation was clearly described by the original bug
reporter 10 months ago. For some reason nobody seems to acknowledge that there
is a problem, the main line of reasoning so far being that 'C++ standard says
only unique (weak) names are valid'. However, that flies in the face of the
whole synmbol versioning mechanism, weak symbols or not. Afterall, versioning
for symbols was introduced precisely to allow multiple instances of the same
symbol to be valid in a shared object context.

Please feel free to correct me on any g++ internal details on which I am no
expert. However, the root problem is there and is a show-stopper for any
attempt of distributing pre-compiled C++ shared object binaries.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libstdc++/21405] Template inlines have global visibility
       [not found] <bug-21405-10578@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2006-03-20 18:32 ` cristipp at excite dot com
@ 2006-03-20 19:34 ` pluto at agmk dot net
  2006-03-20 19:35 ` pluto at agmk dot net
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: pluto at agmk dot net @ 2006-03-20 19:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from pluto at agmk dot net  2006-03-20 19:34 -------
see PR19664, PR20218, PR20297.


-- 

pluto at agmk dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pluto at agmk dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libstdc++/21405] Template inlines have global visibility
       [not found] <bug-21405-10578@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2006-03-20 19:34 ` pluto at agmk dot net
@ 2006-03-20 19:35 ` pluto at agmk dot net
  2006-03-22  4:51 ` bkoz at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: pluto at agmk dot net @ 2006-03-20 19:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from pluto at agmk dot net  2006-03-20 19:35 -------
(In reply to comment #15)
> see PR19664, PR20218, PR20297.

ops, this is the note for C#10.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libstdc++/21405] Template inlines have global visibility
       [not found] <bug-21405-10578@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2006-03-20 19:35 ` pluto at agmk dot net
@ 2006-03-22  4:51 ` bkoz at gcc dot gnu dot org
  2006-03-22 19:11 ` cristipp at excite dot com
  2006-06-20 18:14 ` [Bug libstdc++/21405] Can't give symbol versions to templates jason at gcc dot gnu dot org
  8 siblings, 0 replies; 15+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2006-03-22  4:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from bkoz at gcc dot gnu dot org  2006-03-22 04:51 -------

see the solution in 24660


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libstdc++/21405] Template inlines have global visibility
       [not found] <bug-21405-10578@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2006-03-22  4:51 ` bkoz at gcc dot gnu dot org
@ 2006-03-22 19:11 ` cristipp at excite dot com
  2006-06-20 18:14 ` [Bug libstdc++/21405] Can't give symbol versions to templates jason at gcc dot gnu dot org
  8 siblings, 0 replies; 15+ messages in thread
From: cristipp at excite dot com @ 2006-03-22 19:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from cristipp at excite dot com  2006-03-22 19:10 -------
(In reply to comment #17)
> see the solution in 24660

I'm not sure I understand correctly: are all C++ template libraries supposed to
add 24660-style machinery?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libstdc++/21405] Can't give symbol versions to templates
       [not found] <bug-21405-10578@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2006-03-22 19:11 ` cristipp at excite dot com
@ 2006-06-20 18:14 ` jason at gcc dot gnu dot org
  8 siblings, 0 replies; 15+ messages in thread
From: jason at gcc dot gnu dot org @ 2006-06-20 18:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from jason at gcc dot gnu dot org  2006-06-20 18:12 -------
Changed the summary to clarify, and remove "visibility"


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Template inlines have global|Can't give symbol versions
                   |visibility                  |to templates


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libstdc++/21405] Template inlines have global visibility
  2005-05-05 21:49 [Bug c++/21405] New: Template inlines have global visibility mike at navi dot cx
                   ` (4 preceding siblings ...)
  2005-06-03 22:02 ` adam at gimp dot org
@ 2005-08-02 14:28 ` matze at braunis dot de
  5 siblings, 0 replies; 15+ messages in thread
From: matze at braunis dot de @ 2005-08-02 14:28 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matze at braunis dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libstdc++/21405] Template inlines have global visibility
  2005-05-05 21:49 [Bug c++/21405] New: Template inlines have global visibility mike at navi dot cx
                   ` (3 preceding siblings ...)
  2005-06-01 11:56 ` mike at navi dot cx
@ 2005-06-03 22:02 ` adam at gimp dot org
  2005-08-02 14:28 ` matze at braunis dot de
  5 siblings, 0 replies; 15+ messages in thread
From: adam at gimp dot org @ 2005-06-03 22:02 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adam at gimp dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libstdc++/21405] Template inlines have global visibility
  2005-05-05 21:49 [Bug c++/21405] New: Template inlines have global visibility mike at navi dot cx
                   ` (2 preceding siblings ...)
  2005-05-31 15:29 ` giovannibajo at libero dot it
@ 2005-06-01 11:56 ` mike at navi dot cx
  2005-06-03 22:02 ` adam at gimp dot org
  2005-08-02 14:28 ` matze at braunis dot de
  5 siblings, 0 replies; 15+ messages in thread
From: mike at navi dot cx @ 2005-06-01 11:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mike at navi dot cx  2005-06-01 11:56 -------
So this feature is basically terminally broken and never worked in the first place?

How about if GCC supported a new attribute or something that made it emit
inlines for that class with a specific symbol version?

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libstdc++/21405] Template inlines have global visibility
  2005-05-05 21:49 [Bug c++/21405] New: Template inlines have global visibility mike at navi dot cx
  2005-05-25 23:24 ` [Bug libstdc++/21405] " bkoz at gcc dot gnu dot org
  2005-05-31 13:37 ` mike at navi dot cx
@ 2005-05-31 15:29 ` giovannibajo at libero dot it
  2005-06-01 11:56 ` mike at navi dot cx
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: giovannibajo at libero dot it @ 2005-05-31 15:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2005-05-31 15:10 -------
You can't use -fvisibility-inlines-hidden or otherwise you'll get linker errors 
if the compiler later decides not to inline those functions. I don't think you 
can win.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libstdc++/21405] Template inlines have global visibility
  2005-05-05 21:49 [Bug c++/21405] New: Template inlines have global visibility mike at navi dot cx
  2005-05-25 23:24 ` [Bug libstdc++/21405] " bkoz at gcc dot gnu dot org
@ 2005-05-31 13:37 ` mike at navi dot cx
  2005-05-31 15:29 ` giovannibajo at libero dot it
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: mike at navi dot cx @ 2005-05-31 13:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mike at navi dot cx  2005-05-31 13:23 -------
Reopening the bug, as Benjamin wishes to track it.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libstdc++/21405] Template inlines have global visibility
  2005-05-05 21:49 [Bug c++/21405] New: Template inlines have global visibility mike at navi dot cx
@ 2005-05-25 23:24 ` bkoz at gcc dot gnu dot org
  2005-05-31 13:37 ` mike at navi dot cx
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2005-05-25 23:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bkoz at gcc dot gnu dot org  2005-05-25 22:49 -------
Changing this to libstdc++, so we remember to track this.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |libstdc++


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2006-06-20 18:13 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-21405-10578@http.gcc.gnu.org/bugzilla/>
2005-12-30 18:20 ` [Bug libstdc++/21405] Template inlines have global visibility pinskia at gcc dot gnu dot org
2006-03-20 17:07 ` cristipp at excite dot com
2006-03-20 17:30 ` hjl at lucon dot org
2006-03-20 18:32 ` cristipp at excite dot com
2006-03-20 19:34 ` pluto at agmk dot net
2006-03-20 19:35 ` pluto at agmk dot net
2006-03-22  4:51 ` bkoz at gcc dot gnu dot org
2006-03-22 19:11 ` cristipp at excite dot com
2006-06-20 18:14 ` [Bug libstdc++/21405] Can't give symbol versions to templates jason at gcc dot gnu dot org
2005-05-05 21:49 [Bug c++/21405] New: Template inlines have global visibility mike at navi dot cx
2005-05-25 23:24 ` [Bug libstdc++/21405] " bkoz at gcc dot gnu dot org
2005-05-31 13:37 ` mike at navi dot cx
2005-05-31 15:29 ` giovannibajo at libero dot it
2005-06-01 11:56 ` mike at navi dot cx
2005-06-03 22:02 ` adam at gimp dot org
2005-08-02 14:28 ` matze at braunis dot de

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).