public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/22185] New: final link failed: Nonrepresentable section on output
@ 2005-06-25 16:08 pedro dot lamarao at mndfck dot org
2005-06-25 16:10 ` [Bug libstdc++/22185] " pedro dot lamarao at mndfck dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: pedro dot lamarao at mndfck dot org @ 2005-06-25 16:08 UTC (permalink / raw)
To: gcc-bugs
I get the following with the net_error.ii file attached to this bug:
[pedro@localhost Projetos]$ g++ -O3 -fPIC -c -o net_error.o net_error.ii
[pedro@localhost Projetos]$ g++ -fPIC -shared -o net_error.so net_error.o
/usr/bin/ld: net_error.o(.text+0x8e): unresolvable relocation against symbol
`std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::_Rep::_S_empty_rep_storage@@GLIBCXX_3.4'
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
[pedro@localhost Projetos]$ g++ -O3 -c -o net_error.o net_error.ii
[pedro@localhost Projetos]$ g++ -shared -o net_error.so net_error.o
[pedro@localhost Projetos]$
Works fine.
[pedro@localhost Projetos]$ g++ -fPIC -c -o net_error.o net_error.ii
[pedro@localhost Projetos]$ g++ -fPIC -shared -o net_error.so net_error.o
[pedro@localhost Projetos]$
Works fine.
[pedro@localhost Projetos]$ g++ -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,java,f95,ada --enable-java-awt=gtk
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --host=i386-redhat-linux
Thread model: posix
gcc version 4.0.0 20050519 (Red Hat 4.0.0-8)
The machine runs a Fedora Core 4 system.
--
Summary: final link failed: Nonrepresentable section on output
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pedro dot lamarao at mndfck dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-redhat-linux
GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22185
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/22185] final link failed: Nonrepresentable section on output
2005-06-25 16:08 [Bug libstdc++/22185] New: final link failed: Nonrepresentable section on output pedro dot lamarao at mndfck dot org
@ 2005-06-25 16:10 ` pedro dot lamarao at mndfck dot org
2005-06-25 18:23 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pedro dot lamarao at mndfck dot org @ 2005-06-25 16:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pedro dot lamarao at mndfck dot org 2005-06-25 16:10 -------
Created an attachment (id=9149)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9149&action=view)
Problem code
This file contains the declaration for a class inheriting from
std::runtime_error.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22185
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/22185] final link failed: Nonrepresentable section on output
2005-06-25 16:08 [Bug libstdc++/22185] New: final link failed: Nonrepresentable section on output pedro dot lamarao at mndfck dot org
2005-06-25 16:10 ` [Bug libstdc++/22185] " pedro dot lamarao at mndfck dot org
@ 2005-06-25 18:23 ` pinskia at gcc dot gnu dot org
2005-06-26 14:58 ` pedro dot lamarao at mndfck dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-25 18:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-25 18:23 -------
I think this is a binutils bug and not a bug in GCC and/or libstdc++.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22185
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/22185] final link failed: Nonrepresentable section on output
2005-06-25 16:08 [Bug libstdc++/22185] New: final link failed: Nonrepresentable section on output pedro dot lamarao at mndfck dot org
2005-06-25 16:10 ` [Bug libstdc++/22185] " pedro dot lamarao at mndfck dot org
2005-06-25 18:23 ` pinskia at gcc dot gnu dot org
@ 2005-06-26 14:58 ` pedro dot lamarao at mndfck dot org
2005-08-21 18:02 ` hjl at lucon dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pedro dot lamarao at mndfck dot org @ 2005-06-26 14:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pedro dot lamarao at mndfck dot org 2005-06-26 14:58 -------
Works in the same system with a g++ 3.4.4 compiled from source:
[pedro@localhost Projetos]$ $HOME/.local/gcc-3.4.4/bin/g++ -O3 -fPIC -c -o
net_error.o net_error.ii
[pedro@localhost Projetos]$ $HOME/.local/gcc-3.4.4/bin/g++ -fPIC -shared -o
net_error.so net_error.o
[pedro@localhost Projetos]$ $HOME/.local/gcc-3.4.4/bin/g++ -v Reading specs from
/home/pedro/.local/gcc-3.4.4/lib/gcc/i686-pc-linux-gnu/3.4.4/specs
Configured with: ../configure --prefix=/home/pedro/.local/gcc-3.4.4
--enable-languages=c,c++
Thread model: posix
gcc version 3.4.4
[pedro@localhost Projetos]$
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22185
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/22185] final link failed: Nonrepresentable section on output
2005-06-25 16:08 [Bug libstdc++/22185] New: final link failed: Nonrepresentable section on output pedro dot lamarao at mndfck dot org
` (2 preceding siblings ...)
2005-06-26 14:58 ` pedro dot lamarao at mndfck dot org
@ 2005-08-21 18:02 ` hjl at lucon dot org
2005-08-21 20:25 ` hjl at lucon dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl at lucon dot org @ 2005-08-21 18:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hjl at lucon dot org 2005-08-21 18:02 -------
It is a gcc bug and has been fixed in CVS:
[hjl@gnu .libs]$ readelf --wide -s /usr/lib/libstdc++.so.6 | grep
_ZNSs4_Rep20_S_empty_rep_s | c++filt
1536: 000e3ef8 16 OBJECT WEAK DEFAULT 25 std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::_Rep::_S_empty_rep_storage@@GLIBCXX_3.4
[hjl@gnu .libs]$ readelf --wide -s libstdc++.so.6 | grep
_ZNSs4_Rep20_S_empty_rep_s | c++filt
1535: 000d7d18 16 OBJECT WEAK DEFAULT 25 std::basic_string<char,
std::char_traits<char>, std::allocator<char>
>::_Rep::_S_empty_rep_storage@@GLIBCXX_3.4
2520: 000d7d18 16 OBJECT WEAK DEFAULT 25 std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage
*** This bug has been marked as a duplicate of 22109 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22185
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/22185] final link failed: Nonrepresentable section on output
2005-06-25 16:08 [Bug libstdc++/22185] New: final link failed: Nonrepresentable section on output pedro dot lamarao at mndfck dot org
` (3 preceding siblings ...)
2005-08-21 18:02 ` hjl at lucon dot org
@ 2005-08-21 20:25 ` hjl at lucon dot org
2005-08-21 20:26 ` hjl at lucon dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl at lucon dot org @ 2005-08-21 20:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hjl at lucon dot org 2005-08-21 20:22 -------
Wrong duplicated bug.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|DUPLICATE |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22185
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/22185] final link failed: Nonrepresentable section on output
2005-06-25 16:08 [Bug libstdc++/22185] New: final link failed: Nonrepresentable section on output pedro dot lamarao at mndfck dot org
` (4 preceding siblings ...)
2005-08-21 20:25 ` hjl at lucon dot org
@ 2005-08-21 20:26 ` hjl at lucon dot org
2005-08-21 20:48 ` hjl at lucon dot org
2005-08-26 1:32 ` pedro dot lamarao at mndfck dot org
7 siblings, 0 replies; 9+ messages in thread
From: hjl at lucon dot org @ 2005-08-21 20:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hjl at lucon dot org 2005-08-21 20:25 -------
The real isssue is you can't use
#pragma GCC visibility push(hidden)
on libstdc++ and glibc since they don't support them. We need to fix both glibc
and libstdc++ header files.
*** This bug has been marked as a duplicate of 19664 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22185
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/22185] final link failed: Nonrepresentable section on output
2005-06-25 16:08 [Bug libstdc++/22185] New: final link failed: Nonrepresentable section on output pedro dot lamarao at mndfck dot org
` (5 preceding siblings ...)
2005-08-21 20:26 ` hjl at lucon dot org
@ 2005-08-21 20:48 ` hjl at lucon dot org
2005-08-26 1:32 ` pedro dot lamarao at mndfck dot org
7 siblings, 0 replies; 9+ messages in thread
From: hjl at lucon dot org @ 2005-08-21 20:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hjl at lucon dot org 2005-08-21 20:40 -------
One solution is to put
#pragma GCC visibility push(default)
...
#pragma GCC visibility pop
around all libc and libstdc++ header files, like
#pragma GCC visibility push(default)
#include <iostream.h>
#pragma GCC visibility pop
But you may run into bug 20303.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22185
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/22185] final link failed: Nonrepresentable section on output
2005-06-25 16:08 [Bug libstdc++/22185] New: final link failed: Nonrepresentable section on output pedro dot lamarao at mndfck dot org
` (6 preceding siblings ...)
2005-08-21 20:48 ` hjl at lucon dot org
@ 2005-08-26 1:32 ` pedro dot lamarao at mndfck dot org
7 siblings, 0 replies; 9+ messages in thread
From: pedro dot lamarao at mndfck dot org @ 2005-08-26 1:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pedro dot lamarao at mndfck dot org 2005-08-26 01:31 -------
Substituting the pragma for -fvisibility=hidden also seems to solve the problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22185
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-08-26 1:31 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-25 16:08 [Bug libstdc++/22185] New: final link failed: Nonrepresentable section on output pedro dot lamarao at mndfck dot org
2005-06-25 16:10 ` [Bug libstdc++/22185] " pedro dot lamarao at mndfck dot org
2005-06-25 18:23 ` pinskia at gcc dot gnu dot org
2005-06-26 14:58 ` pedro dot lamarao at mndfck dot org
2005-08-21 18:02 ` hjl at lucon dot org
2005-08-21 20:25 ` hjl at lucon dot org
2005-08-21 20:26 ` hjl at lucon dot org
2005-08-21 20:48 ` hjl at lucon dot org
2005-08-26 1:32 ` pedro dot lamarao at mndfck dot org
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).