[Bug libstdc++/25797] [4.2 Regression] almost all libstdc++ tests fail

bkoz at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jan 20 00:23:00 GMT 2006

------- Comment #9 from bkoz at gcc dot gnu dot org  2006-01-20 00:23 -------

H.J, are you seeing this kind of additional symptom with binutils-2.16.1:

FAIL: 21_strings/basic_string/cons/char/6.cc (test for excess errors)
Excess errors:
std::basic_string<char, std::char_traits<char>, std::allocator<char>
>::_S_construct<char*>(char*, char*, std::allocator<char> const&,
std::forward_iterator_tag)]+0x8b): unresolvable relocation against symbol
`std::__throw_logic_error(char const*)@@GLIBCXX_3.4'
/mnt/hd/bld/H-x86-binutils-2.16.1/bin/ld: final link failed: Nonrepresentable
section on output
collect2: ld returned 1 exit status

I don't understand how to test for this "unresolvable relocation against
symbol" stuff... I see this bug report about this error in another context:


I've tried to narrow this down. Indeed, if the compile line for the above error
removes -Wl,--gc-sections, the link is fine. So, it appears as if it does do
something different.

To make a small case, (ie, so we can then make an autoconf test...). I tried to
make a two part test, where you take one file, use all the relevant flags, and
make a shared object, which you then compile with some more flags to create an

However, I cannot reproduce it. 

Any insights? This seems like more your area.

My other thought is to just black-list --gc-sections for binutils pre 2.16.2.
It's not a great solution, but I think it will work.

If there is no better idea by tomorrow this is what I'll check in.




More information about the Gcc-bugs mailing list