This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

relocation errors on solaris 10 u10 due to symbol versioning from ld


Hi,
After updating to solaris 10 u10, I've been seeing issues with libstdc++ that I believe are a result of output from the gnu linker (binutils 2.19).? I'm getting relocation errors when using certain symbols from libstdc++.? LD_DEBUG output shows that these are not being considered because the interpreter believes that they have the hidden bit set:
03888: 1: symbol=_ZNSi6ignoreEv;? lookup in file=a.out? [ ELF ]
03888: 1: symbol=_ZNSi6ignoreEv;? lookup in file=/home/server/lib/libstdc++.so.6? [ ELF ]
03888: 1: symbol=_ZNSi6ignoreEv;? hash index=3055; ?version=32770;? skipping symbol with GNU version hidden bit set in file=/home/server/lib/libstdc++.so.6
03888: 1: symbol=_ZNSi6ignoreEv;? lookup in file=/lib/libm.so.2? [ ELF ]
03888: 1: symbol=_ZNSi6ignoreEv;? lookup in file=/home/server/lib/libgcc_s.so.1? [ ELF ]
03888: 1: symbol=_ZNSi6ignoreEv;? lookup in file=/lib/libc.so.1? [ ELF ]
03888: 1: 
03888: 1: 
03888: 1: libc.so.1: a.out: fatal: relocation error: file a.out: symbol _ZNSi6ignoreEv: referenced symbol not found

Using elfdump on libstdc++ shows that certain symbols seem to have extra bits set that are now being interpreted as hidden.? The previous output was for the ver to be 32770 (0x8002).? Gcc is being built with gas and gnu ld, and this seems to occur on both sparc and x86 distributions.? Building with sun ld does not show this problem.? It seems like these might be using the BSF_DYNAMIC flag, but I'm not familiar enough with the binutils source to confirm this.

Output from elfdump:
???? index??? value????? size????? type bind oth ver shndx????????? name
????? [72]? 0x00048ca4 0x0000003a? FUNC GLOB? D?? 2H .text???????? ?_ZNKSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv
???? [384]? 0x0004893c 0x0000001f? FUNC GLOB? D?? 2H .text????????? _ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw
???? [647]? 0x00048bf8 0x00000035? FUNC GLOB? D?? 2H .text????????? _ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv
???? [887]? 0x0004895c 0x0000003a? FUNC GLOB? D?? 2H .text????????? _ZNKSt13basic_fstreamIwSt11char_traitsIwEE7is_openEv
???? [935]? 0x00048b90 0x00000042? FUNC GLOB? D?? 2H .text????????? _ZNSs7_M_moveEPcPKcj
???? [958]? 0x00048998 0x0000003a? FUNC GLOB? D?? 2H .text????????? _ZNKSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv
???? [990]? 0x00048aa8 0x00000040? FUNC GLOB? D?? 2H .text????????? _ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPwjw
??? [1154]? 0x00048a6c 0x00000039? FUNC GLOB? D?? 2H .text????????? _ZNKSs15_M_check_lengthEjjPKc
??? [1331]? 0x000489d4 0x0000002f? FUNC GLOB? D?? 2H .text????????? _ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableEj
??? [1406]? 0x00048ae8 0x00000042? FUNC GLOB? D?? 2H .text????????? _ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKwj
??? [1520]? 0x00048f48 0x000001fe? FUNC GLOB? D?? 2H .text????????? _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEi
??? [1604]? 0x00048ce0 0x0000003a? FUNC GLOB? D?? 2H .text????????? _ZNKSt14basic_ofstreamIwSt11char_traitsIwEE7is_openEv
??? [1615]? 0x00048c30 0x00000037? FUNC GLOB? D?? 2H .text????????? _ZNSt19istreambuf_iteratorIwSt11char_traitsIwEEppEv
??? [1831]? 0x00048b2c 0x00000042? FUNC GLOB? D?? 2H .text????????? _ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKwj
??? [2080]? 0x00048828 0x00000010? FUNC GLOB? D?? 2H .text????????? _ZNSt11char_traitsIwE2eqERKwS2_
??? [2185]? 0x00048a04 0x0000002c? FUNC GLOB? D?? 2H .text????????? _ZNSs4_Rep26_M_set_length_and_sharableEj
??? [2342]? 0x00048e48 0x00000100? FUNC GLOB? D?? 2H .text????????? _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEv
??? [2397]? 0x00048b70 0x00000020? FUNC GLOB? D?? 2H .text????????? _ZNSs9_M_assignEPcjc
??? [2400]? 0x00049148 0x000001fa? FUNC GLOB? D?? 2H .text????????? _ZNSi6ignoreEi
??? [2617]? 0x00048818 0x00000010? FUNC GLOB? D?? 2H .text????????? _ZNSt11char_traitsIcE2eqERKcS2_
??? [2798]? 0x00048c68 0x0000003a? FUNC GLOB? D?? 2H .text????????? _ZNKSt14basic_ofstreamIcSt11char_traitsIcEE7is_openEv
??? [3055]? 0x00048d58 0x000000f0? FUNC GLOB? D?? 2H .text????????? _ZNSi6ignoreEv
??? [3326]? 0x00048a30 0x00000039? FUNC GLOB? D?? 2H .text????????? _ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthEjjPKc
??? [3336]? 0x00048d1c 0x0000003a? FUNC GLOB? D?? 2H .text????????? _ZNKSt14basic_ifstreamIwSt11char_traitsIwEE7is_openEv
??? [3381]? 0x00048bd4 0x00000023? FUNC GLOB? D?? 2H .text????????? _ZNSs7_M_copyEPcPKcj
??? [3447]? 0x00048920 0x0000001b? FUNC GLOB ?D?? 2H .text????????? _ZNKSs11_M_disjunctEPKc

Has anyone seen similar behavior?? Alternately, can anyone provide a reason why some symbols are showing this version and if this behavior is correct?? I've searched both the bug listings and this mailing list, but haven't seen anything related.

Thanks,
Bennett Schneider


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]