[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/7027] New: 64-bit libstdc++.so fails to link on Solaris 11/SPARC
From: |
ro at TechFak dot Uni-Bielefeld dot DE |
Subject: |
[Bug ld/7027] New: 64-bit libstdc++.so fails to link on Solaris 11/SPARC: could not read symbols: Bad value |
Date: |
12 Nov 2008 14:43:47 -0000 |
Trying to build current gcc mainline with GNU ld 2.19 fails linking the 64-bit
libstdc++.so. When I retried with binutils mainline, the problems persists:
% /vol/gcc/obj/binutils-2.19.50-g/ld/ld-new -V -G -dy -z text -m elf64_sparc -Y
P,/usr/lib/sparcv9 -rpath-link /usr/lib/sparcv9 -Qy -o .libs/libstdc++.so.6.0.11
-L/vol/gccsrc/obj/gcc-4.4.0-20081110/11-gcc-gld/sparc-sun-solaris2.11/sparcv9/libstdc++-v3/src
-L/vol/gccsrc/obj/gcc-4.4.0-20081110/11-gcc-gld/sparc-sun-solaris2.11/sparcv9/libstdc++-v3/src/.libs
-L/vol/gccsrc/obj/gcc-4.4.0-20081110/11-gcc-gld/sparc-sun-solaris2.11/sparcv9/libstdc++-v3/src
-L/vol/gccsrc/obj/gcc-4.4.0-20081110/11-gcc-gld/sparc-sun-solaris2.11/sparcv9/libstdc++-v3/src/.libs
-L/vol/gccsrc/obj/gcc-4.4.0-20081110/11-gcc-gld/./gcc/sparcv9
-L/usr/ccs/lib/sparcv9 -L/lib/sparcv9 -L/usr/lib/sparcv9
-L/vol/gccsrc/obj/gcc-4.4.0-20081110/11-gcc-gld/./gcc -L/usr/ccs/lib
-L/vol/gccsrc/obj/gcc-4.4.0-20081110/11-gcc-gld/./gcc/sparcv9
-L/usr/ccs/lib/sparcv9 -L/lib/sparcv9 -L/usr/lib/sparcv9
-L/vol/gccsrc/obj/gcc-4.4.0-20081110/11-gcc-gld/./gcc -L/usr/ccs/lib
/vol/gccsrc/obj/gcc-4.4.0-20081110/11-gcc-gld/./gcc/sparcv9/crti.o
/usr/ccs/lib/sparcv9/values-Xa.o
/vol/gccsrc/obj/gcc-4.4.0-20081110/11-gcc-gld/./gcc/sparcv9/crtbegin.o
.libs/atomic.o .libs/bitmap_allocator.o .libs/pool_allocator.o
.libs/mt_allocator.o .libs/codecvt.o .libs/compatibility.o .libs/complex_io.o
.libs/ctype.o .libs/debug.o .libs/functexcept.o .libs/hash.o .libs/hash_c++0x.o
.libs/globals_io.o .libs/hashtable.o .libs/hashtable_c++0x.o .libs/ios.o
.libs/ios_failure.o .libs/ios_init.o .libs/ios_locale.o .libs/limits.o
.libs/limits_c++0x.o .libs/list.o .libs/debug_list.o .libs/locale.o
.libs/locale_init.o .libs/locale_facets.o .libs/localename.o .libs/stdexcept.o
.libs/strstream.o .libs/system_error.o .libs/tree.o .libs/allocator-inst.o
.libs/concept-inst.o .libs/fstream-inst.o .libs/ext-inst.o .libs/ios-inst.o
.libs/iostream-inst.o .libs/istream-inst.o .libs/istream.o .libs/locale-inst.o
.libs/misc-inst.o .libs/ostream-inst.o .libs/sstream-inst.o
.libs/streambuf-inst.o .libs/streambuf.o .libs/string-inst.o
.libs/valarray-inst.o .libs/wlocale-inst.o .libs/wstring-inst.o .libs/mutex.o
.libs/condition_variable.o .libs/chrono.o .libs/thread.o .libs/atomicity.o
.libs/codecvt_members.o .libs/collate_members.o .libs/ctype_members.o
.libs/messages_members.o .libs/monetary_members.o .libs/numeric_members.o
.libs/time_members.o .libs/basic_file.o .libs/c++locale.o .libs/parallel_list.o
.libs/parallel_settings.o --whole-archive ../libmath/.libs/libmath.a
../libsupc++/.libs/libsupc++convenience.a --no-whole-archive -lm -lgcc_s
/vol/gccsrc/obj/gcc-4.4.0-20081110/11-gcc-gld/./gcc/sparcv9/crtend.o
/vol/gccsrc/obj/gcc-4.4.0-20081110/11-gcc-gld/./gcc/sparcv9/crtn.o -O1 -z relro
--gc-sections --version-script=libstdc++-symbols.ver -soname libstdc++.so.6
GNU ld (GNU Binutils) 2.19.50.20081111
Supported emulations:
elf32_sparc
elf64_sparc
.libs/atomic.o: could not read symbols: Bad value
Tracking this down (with an unoptimize ld compiled with -g only, because gdb
couldn't proper handle the -g -O2 binary), I found that bfd_set_error
(bfd_error_bad_value) is called from here:
#0 bfd_set_error (error_tag=bfd_error_bad_value) at
/vol/gnu/src/binutils/binutils-dist/bfd/bfd.c:425
#1 0x0008d130 in _bfd_sparc_elf_check_relocs (abfd=0x1dc510, info=0x19d978,
sec=0x1f6a20, relocs=0x1fdc10) at
/vol/gnu/src/binutils/binutils-dist/bfd/elfxx-sparc.c:1335
#2 0x000c4210 in elf_link_add_object_symbols (abfd=0x1dc510, info=0x19d978) at
/vol/gnu/src/binutils/binutils-dist/bfd/elflink.c:4722
#3 0x000c4dc8 in bfd_elf_link_add_symbols (abfd=0x1dc510, info=0x19d978) at
/vol/gnu/src/binutils/binutils-dist/bfd/elflink.c:5044
#4 0x0002e604 in load_symbols (entry=0x19dfc8, place=0xffbfe8d0) at
/vol/gnu/src/binutils/binutils-dist/ld/ldlang.c:2599
#5 0x0002f6b8 in open_input_bfds (s=0x19dfc8, force=0) at
/vol/gnu/src/binutils/binutils-dist/ld/ldlang.c:3028
#6 0x00037798 in lang_process () at
/vol/gnu/src/binutils/binutils-dist/ld/ldlang.c:6112
#7 0x0003ce4c in main (argc=114, argv=0xffbfea7c) at
/vol/gnu/src/binutils/binutils-dist/ld/ldmain.c:453
I.e. from bfd/elfxx-sparc.c (_bfd_sparc_elf_check_relocs), l. 1335. At that
point, r_type = 18 (R_SPARC_WPLT30) and readelf on the problematic object
file reveals
% readelf -r .libs/atomic.o |grep R_SPARC_WPLT30
000000000014 000e00000012 R_SPARC_WPLT30 0000000000000000 .text + 0
000000000008 001800000012 R_SPARC_WPLT30 0000000000000000
atomic_flag_clear_expl + 0
000000000008 001b00000012 R_SPARC_WPLT30 0000000000000000
atomic_flag_test_and_s + 0
000000000008 001b00000012 R_SPARC_WPLT30 0000000000000000
atomic_flag_test_and_s + 0
It seems that a workaround similar to the ! ABI_64_P() case may be needed
for the 64-bit case as well.
--
Summary: 64-bit libstdc++.so fails to link on Solaris 11/SPARC:
could not read symbols: Bad value
Product: binutils
Version: 2.20 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: ro at TechFak dot Uni-Bielefeld dot DE
CC: bug-binutils at gnu dot org
GCC build triplet: sparc-sun-solaris2.11
GCC host triplet: sparc-sun-solaris2.11
GCC target triplet: sparc-sun-solaris2.11
http://sourceware.org/bugzilla/show_bug.cgi?id=7027
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug ld/7027] New: 64-bit libstdc++.so fails to link on Solaris 11/SPARC: could not read symbols: Bad value,
ro at TechFak dot Uni-Bielefeld dot DE <=
- [Bug ld/7027] 64-bit libstdc++.so fails to link on Solaris 11/SPARC: could not read symbols: Bad value, nickc at redhat dot com, 2008/11/14
- [Bug ld/7027] 64-bit libstdc++.so fails to link on Solaris 11/SPARC: could not read symbols: Bad value, nickc at redhat dot com, 2008/11/14
- [Bug ld/7027] 64-bit libstdc++.so fails to link on Solaris 11/SPARC: could not read symbols: Bad value, ro at TechFak dot Uni-Bielefeld dot DE, 2008/11/14
- [Bug ld/7027] 64-bit libstdc++.so fails to link on Solaris 11/SPARC: could not read symbols: Bad value, ro at TechFak dot Uni-Bielefeld dot DE, 2008/11/14
- [Bug ld/7027] 64-bit libstdc++.so fails to link on Solaris 11/SPARC: could not read symbols: Bad value, nickc at redhat dot com, 2008/11/14
- [Bug ld/7027] 64-bit libstdc++.so fails to link on Solaris 11/SPARC: could not read symbols: Bad value, ro at TechFak dot Uni-Bielefeld dot DE, 2008/11/14
- [Bug ld/7027] 64-bit libstdc++.so fails to link on Solaris 11/SPARC: could not read symbols: Bad value, ian at airs dot com, 2008/11/16
- [Bug ld/7027] 64-bit libstdc++.so fails to link on Solaris 11/SPARC: could not read symbols: Bad value, nickc at redhat dot com, 2008/11/17
- [Bug ld/7027] 64-bit libstdc++.so fails to link on Solaris 11/SPARC: could not read symbols: Bad value, nickc at redhat dot com, 2008/11/17