From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11351 invoked by alias); 4 Dec 2013 07:33:20 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 11320 invoked by uid 48); 4 Dec 2013 07:33:15 -0000 From: "cnstar9988 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/59380] New: libstdc++.a: could not read symbols: Bad value Date: Wed, 04 Dec 2013 07:33:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cnstar9988 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-12/txt/msg00249.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59380 Bug ID: 59380 Summary: libstdc++.a: could not read symbols: Bad value Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: cnstar9988 at gmail dot com libstdc++.a: could not read symbols: Bad value gcc 4.8.2 ====foo.cc===== #include void foo() { std::cout << 42 << std::endl; } g++ -pthread -fPIC -o foo.so -shared foo.cc [root@hpblade01 ~]# g++ -pthread -fPIC -o foo.so -shared foo.cc /usr/bin/ld: /opt/gcc-4.8.2/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libstdc++.a(ios_init.o): relocation R_X86_64_32 against `__pthread_key_create' can not be used when making a shared object; recompile with -fPIC /opt/gcc-4.8.2/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/libstdc++.a: could not read symbols: Bad value collect2: error: ld returned 1 exit status ======= Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/opt/gcc-4.8.2/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper Target: x86_64-redhat-linux Configured with: ../src/configure --prefix=/opt/gcc-4.8.2 --enable-languages=c,c++ --with-pic --disable-shared --enable-threads=posix --enable-checking=release --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --disable-nls --with-cpu=generic --disable-multilib --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.2 (GCC)