When I compile bitswash-0.0.5 http://sourceforge.net/projects/bitswash I get
numerous errors of this nature:

`.L53295' referenced in section `.rodata' of .libs/session_impl.o: defined in
discarded section
`.gnu.linkonce.t._ZN5boost7variantINS_6detail7variant13over_sequenceINS_3mpl6v_itemINS_5blankENS5_IPN10libtorrent11http_streamENS5_IPNS7_13socks4_streamENS5_IPNS7_13socks5_streamENS5_IPN4asio19basic_stream_socketINSE_2ip3tcpENSE_21stream_socket_serviceISH_EEEENS4_7vector0IN4mpl_2naEEELi0EEELi0EEELi0EEELi0EEELi0EEEEENS2_5void_ESW_SW_SW_SW_SW_SW_SW_SW_SW_SW_SW_SW_SW_SW_SW_SW_SW_SW_E22internal_apply_visitorINS2_14invoke_visitorIKNS7_3aux23remote_endpoint_visitorINSG_14basic_endpointISH_EENSN_5void_EEEEEEENT_11result_typeERS18_'
of .libs/session_impl.o

After un-tarring and configuring, cd to libtorrent/src and type make to build
the problem section - and get
dozens of 'gnu.linkonce.t' errors for a few files. I am using the newest
version of everything and a 3.x series GCC.


This is a similar bug to "Discarded Linkonce sections in .rodata"
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16625
which is reported against GCC 3.4.0 (Opened: 2004-07-19), marked as "RESOLVED
FIXED" (2007-09-07) for GCC 4.1 or later.

This report is for the newest GCC 3.x for Debian, "GNU C++ version 3.4.6
(Debian 3.4.6-6) (i486-linux-gnu)".
Since there are still releases for 3.x and the other report is closed (after
three years) I am filing this one.

I used the small testcase from "Comment #27"
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16625#c27 but compiled
it with only this one version of g++ (as opposed to mixing different versions
as Simon did).

# g++-3.4 -v
Reading specs from /usr/lib/gcc/i486-linux-gnu/3.4.6/specs
Configured with: ../src/configure -v --enable-languages=c,c++,f77,pascal
--prefix=/usr --libexecdir=/usr/lib --with-gxx-include-dir=/usr/include/c++/3.4
--enable-shared --with-system-zlib --enable-nls --without-included-gettext
--program-suffix=-3.4 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --with-tune=i686 i486-linux-gnu
Thread model: posix
gcc version 3.4.6 (Debian 3.4.6-6)

# ld -V
GNU ld (GNU Binutils for Debian) 2.18.20071027


# g++-3.4 -Wall -W -pedantic -O2 -c lib1.cc
# g++-3.4 -Wall -W -pedantic -O2 -c lib2.cc
# g++-3.4 -Wall -W -pedantic -Wl,--verbose -o main lib1.o lib2.o main.cc
...
attempt to open lib1.o succeeded
lib1.o
attempt to open lib2.o succeeded
lib2.o
attempt to open /tmp/ccuiuvcP.o succeeded
/tmp/ccuiuvcP.o
attempt to open`.gnu.linkonce.t._ZN3Foo1fEi' referenced in section `.rodata' of
lib2.o: defined in discarded section `.gnu.linkonce.t._ZN3Foo1fEi' of lib2.o
...
collect2: ld returned 1 exit status


I also tested this on g++ "4.1.2 20061115 (prerelease) (Debian 4.1.1-21)" and
g++ "4.2.2 (20070804)"; the problem does not seem to occur with the gcc 4.x
series.


-- 
           Summary: "Addr_Label" referenced in section `.rodata' of "file":
                    defined in discarded section `.gnu.linkonce.t...' of
                    "file"
           Product: gcc
           Version: 3.4.6
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rob1weld at aol dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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

Reply via email to