[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/2524] New: Solaris versioning glitches when building shared libr
From: |
amu at alum dot mit dot edu |
Subject: |
[Bug ld/2524] New: Solaris versioning glitches when building shared libraries against static ones |
Date: |
6 Apr 2006 17:55:55 -0000 |
Although I have found the patch from bug 1031 helpful, there are still
circumstances in which symbol versioning evidently confuses ld. In particular,
chains of shared libraries that link against both -lpthread and [GCC 4.0.1's]
libsupc++.a are problematic, with ld eventually deciding that a user library
defines some pthread_ symbols and subsequently reporting an error at the next
stage:
gcc -pthreads -fpic -Dfunc=baz -Doldfunc=bar -c foo.cc -o baz.o
nm -p baz.o | grep pthread
gmake: [baz.o] Error 1 (ignored)
gcc -pthreads -fpic -Dfunc=bar -Doldfunc=foo -c foo.cc -o bar.o
nm -p bar.o | grep pthread
gmake: [bar.o] Error 1 (ignored)
gcc -pthreads -fpic -Dfunc=foo -c foo.cc -o foo.o
nm -p foo.o | grep pthread
0000000000 U pthread_cancel
gcc -pthreads -shared -o libfoo.so foo.o -lpthread -lsupc++
nm -p libfoo.so | grep pthread
0000000000 U pthread_cancel@@SUNW_0.9
0000000000 U pthread_getspecific@@SUNW_0.9
0000000000 U pthread_key_create@@SUNW_0.9
0000000000 U pthread_mutex_lock@@SUNW_0.9
0000000000 U pthread_mutex_unlock@@SUNW_0.9
0000000000 U pthread_once@@SUNW_0.9
0000000000 U pthread_setspecific@@SUNW_0.9
gcc -pthreads -shared -o libbar.so bar.o -L. -lfoo -lpthread -lsupc++
nm -p libbar.so | grep pthread
gmake: [libbar.so] Error 1 (ignored)
gcc -pthreads -shared -o libbaz.so baz.o -L. -lbar -lpthread -lsupc++
nm -p libbaz.so | grep pthread
0000000000 T pthread_cancel@@SUNW_0.9
0000000000 U pthread_getspecific@@SUNW_0.9
0000000000 U pthread_key_create@@SUNW_0.9
0000000000 U pthread_mutex_lock@@SUNW_0.9
0000000000 U pthread_mutex_unlock@@SUNW_0.9
0000000000 U pthread_once@@SUNW_0.9
0000000000 U pthread_setspecific@@SUNW_0.9
gcc -pthreads -shared -o libquux.so quux.o -L. -lbaz -lpthread -lsupc++
/netopt/gcc/4.0.1a/solaris10-sparc/bin/ld: ./libbaz.so: pthread_cancel: invalid
version 3 (max 0)
./libbaz.so: could not read symbols: Bad value
collect2: ld returned 1 exit status
gmake: *** [libquux.so] Error 1
--
Summary: Solaris versioning glitches when building shared
libraries against static ones
Product: binutils
Version: 2.16
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: amu at alum dot mit dot edu
CC: bug-binutils at gnu dot org
GCC build triplet: sparc-sun-solaris2.10
GCC host triplet: sparc-sun-solaris2.10
GCC target triplet: sparc-sun-solaris2.10
http://sourceware.org/bugzilla/show_bug.cgi?id=2524
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug ld/2524] New: Solaris versioning glitches when building shared libraries against static ones,
amu at alum dot mit dot edu <=