public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19664] New: -fvisibility-inlines-hidden fails with gcc's extern template extension on amd64
@ 2005-01-28  6:45 andreas dot pokorny at gmx dot de
  2005-01-28  9:56 ` [Bug c++/19664] " pcarlini at suse dot de
                   ` (59 more replies)
  0 siblings, 60 replies; 102+ messages in thread
From: andreas dot pokorny at gmx dot de @ 2005-01-28  6:45 UTC (permalink / raw)
  To: gcc-bugs

Failing code:
template<typename CharT>
struct VisTest
{
  inline VisTest ();
};
template<typename CharT>
inline VisTest<CharT>::VisTest()
{}
extern template class VisTest<char>;  // It works if we drop that line
int some_function( int do_something ) __attribute__ ((visibility("default")));
int some_function( int do_something )
{
  VisTest<char> a;
  return 0;
}

g++ -fPIC -fvisibility=hidden -fvisibility-inlines-hidden lib.cpp -c
g++ -shared -fPIC  -fvisibility=hidden -fvisibility-inlines-hidden lib.o -o
liblib.so

/usr/lib/gcc/x86_64-pc-linux-gnu/4.0.0/../../../../x86_64-pc-linux-gnu/bin/ld:
lib.o: relocation R_X86_64_PC32 against `VisTest<char>::VisTest()' can not be
used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.0.0/../../../../x86_64-pc-linux-gnu/bin/ld:
final link failed: Bad value
collect2: ld returned 1 exit status

This happens with nearly all cases in which libstdc++ headers are involved:
http://bugs.gentoo.org/show_bug.cgi?id=78720
http://groups.google.de/groups?q=relocation+R_X86_64_PC32+against+making+a+shared+object&hl=de&lr=&selm=ct12kj%242njo%241%40FreeBSD.csie.NCTU.edu.tw&rnum=2

-- 
           Summary: -fvisibility-inlines-hidden fails with gcc's extern
                    template extension on amd64
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: andreas dot pokorny at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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


^ permalink raw reply	[flat|nested] 102+ messages in thread
[parent not found: <bug-19664-10020@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2007-05-28 17:47 UTC | newest]

Thread overview: 102+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-28  6:45 [Bug c++/19664] New: -fvisibility-inlines-hidden fails with gcc's extern template extension on amd64 andreas dot pokorny at gmx dot de
2005-01-28  9:56 ` [Bug c++/19664] " pcarlini at suse dot de
2005-01-28 13:02 ` lanius at gentoo dot org
2005-01-28 13:04 ` lanius at gentoo dot org
2005-01-28 13:13 ` pcarlini at suse dot de
2005-01-28 13:35 ` simon dot strandman at telia dot com
2005-01-28 14:19 ` [Bug target/19664] " pinskia at gcc dot gnu dot org
2005-01-29  1:05 ` hjl at lucon dot org
2005-01-29 13:05 ` pinskia at gcc dot gnu dot org
2005-01-29 15:09 ` andreas dot pokorny at gmx dot de
2005-01-29 15:26 ` andreas dot pokorny at gmx dot de
2005-01-29 15:28 ` pinskia at gcc dot gnu dot org
2005-01-29 15:33 ` [Bug libstdc++/19664] libstdc++ headers should have pop/push of the visibility around the declarations pinskia at gcc dot gnu dot org
2005-01-29 15:37 ` pinskia at gcc dot gnu dot org
2005-01-29 16:24 ` [Bug target/19664] " andreas dot pokorny at gmx dot de
2005-01-29 16:26 ` [Bug libstdc++/19664] " pinskia at gcc dot gnu dot org
2005-01-29 20:52 ` pcarlini at suse dot de
2005-01-31 10:32 ` pcarlini at suse dot de
2005-01-31 18:57 ` pcarlini at suse dot de
2005-02-02 13:51 ` pcarlini at suse dot de
2005-02-02 16:01 ` pcarlini at suse dot de
2005-02-02 16:09 ` hjl at lucon dot org
2005-02-02 16:16 ` pcarlini at suse dot de
2005-02-02 16:25 ` pcarlini at suse dot de
2005-02-02 17:18 ` hjl at lucon dot org
2005-02-06 10:20 ` [Bug c/19664] " giovannibajo@libero.it
2005-02-06 13:19 ` pcarlini@suse.de
2005-02-06 13:21 ` pcarlini@suse.de
2005-02-06 13:21 ` pcarlini@suse.de
2005-02-06 16:17 ` hjl@lucon.org
2005-02-08 13:55 ` [Bug libstdc++/19664] " hjl at lucon dot org
2005-02-26 18:32 ` bkoz at gcc dot gnu dot org
2005-02-27 12:49 ` giovannibajo at libero dot it
2005-02-27 14:52 ` hjl at lucon dot org
2005-04-18 12:49 ` matz at suse dot de
2005-04-18 12:50 ` matz at suse dot de
2005-04-18 14:14 ` pcarlini at suse dot de
2005-05-04 17:15 ` hjl at lucon dot org
2005-05-17 19:06 ` pcarlini at suse dot de
2005-05-17 21:39 ` pluto at agmk dot net
2005-05-17 21:40 ` mark at codesourcery dot com
2005-05-17 21:47 ` cvs-commit at gcc dot gnu dot org
2005-05-17 21:50 ` hjl at lucon dot org
2005-05-17 21:58 ` mark at codesourcery dot com
2005-05-17 22:00 ` pcarlini at suse dot de
2005-05-18 15:42 ` pluto at agmk dot net
2005-05-18 15:45 ` pcarlini at suse dot de
2005-05-19 10:02 ` bernie at develer dot com
2005-05-19 19:37 ` mark at codesourcery dot com
2005-05-20  8:35 ` lanius at gentoo dot org
2005-05-20  8:59 ` pluto at agmk dot net
2005-05-20  9:02 ` pluto at agmk dot net
2005-05-20  9:04 ` pcarlini at suse dot de
2005-05-20 18:48 ` mark at codesourcery dot com
2005-05-21 16:50 ` aj at suse dot de
2005-07-06 10:40 ` pcarlini at suse dot de
2005-07-14 17:02 ` pinskia at gcc dot gnu dot org
2005-07-21 16:18 ` pinskia at gcc dot gnu dot org
2005-08-21 20:26 ` hjl at lucon dot org
2005-08-29 20:58 ` pinskia at gcc dot gnu dot org
2005-08-29 22:24 ` geoffk at gcc dot gnu dot org
     [not found] <bug-19664-10020@http.gcc.gnu.org/bugzilla/>
2005-10-08 13:42 ` pinskia at gcc dot gnu dot org
2005-10-21 11:36 ` mueller at kde dot org
2005-10-21 11:40 ` pcarlini at suse dot de
2005-10-24  5:22 ` mueller at kde dot org
2005-10-24  9:14 ` pcarlini at suse dot de
2005-10-25 15:41 ` mueller at kde dot org
2005-10-25 15:44 ` pcarlini at suse dot de
2005-10-31 16:47 ` bkoz at gcc dot gnu dot org
2005-10-31 17:00 ` pcarlini at suse dot de
2005-10-31 18:37 ` ismail at uludag dot org dot tr
2005-10-31 22:14 ` geoffk at geoffk dot org
2005-10-31 22:45 ` mueller at kde dot org
2005-10-31 23:29 ` geoffk at geoffk dot org
2005-11-01  2:12 ` pcarlini at suse dot de
2005-11-01  2:21 ` pcarlini at suse dot de
2005-11-01  3:59 ` bkoz at gcc dot gnu dot org
2005-11-01  4:31 ` geoffk at geoffk dot org
2005-11-03  9:38 ` bero at arklinux dot org
2005-12-06 17:05 ` pluto at agmk dot net
2005-12-15 23:42 ` geoffk at gcc dot gnu dot org
2006-02-11 17:15 ` pinskia at gcc dot gnu dot org
2006-03-13 20:18 ` pluto at agmk dot net
2006-03-14  9:24 ` mueller at gcc dot gnu dot org
2006-04-03 23:57 ` pinskia at gcc dot gnu dot org
2006-04-04  0:24 ` geoffk at geoffk dot org
2006-04-26  2:14 ` pinskia at gcc dot gnu dot org
2006-07-15 10:35 ` jakub at redhat dot com
2006-07-19  2:52 ` bkoz at gcc dot gnu dot org
2006-07-19  2:56 ` bkoz at gcc dot gnu dot org
2006-07-20 22:02 ` pinskia at gcc dot gnu dot org
2006-07-20 23:37 ` bkoz at gcc dot gnu dot org
2006-07-28  4:57 ` bkoz at gcc dot gnu dot org
2006-08-22 12:44 ` bkoz at gcc dot gnu dot org
2007-02-22 23:57 ` pinskia at gcc dot gnu dot org
2007-02-22 23:59 ` pinskia at gcc dot gnu dot org
2007-04-03 16:37 ` pinskia at gcc dot gnu dot org
2007-05-28  4:16 ` funtoos at yahoo dot com
2007-05-28  5:02 ` pluto at agmk dot net
2007-05-28  5:16 ` funtoos at yahoo dot com
2007-05-28 11:49 ` simon dot strandman at telia dot com
2007-05-28 17:47 ` funtoos at yahoo dot com

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