[v3] use -Wl,-z,relro if possible
Paolo Carlini
pcarlini@suse.de
Fri Jan 13 12:50:00 GMT 2006
Hi Benjamin,
>For GNU ld that supports -z relro, use it when creating shared object.
>
On x86-linux, stock binutils 2.16.1, today I'm seeing a bunch of new
failures in 21_string:
FAIL: 21_strings/basic_string/cons/char/6.cc (test for excess errors)
WARNING: 21_strings/basic_string/cons/char/6.cc compilation failed to
produce executable
FAIL: 21_strings/basic_string/inserters_extractors/char/1.cc (test for
excess errors)
WARNING: 21_strings/basic_string/inserters_extractors/char/1.cc
compilation failed to produce executable
FAIL: 21_strings/basic_string/inserters_extractors/char/4.cc (test for
excess errors)
WARNING: 21_strings/basic_string/inserters_extractors/char/4.cc
compilation failed to produce executable
FAIL: 21_strings/basic_string/inserters_extractors/char/8.cc (test for
excess errors)
WARNING: 21_strings/basic_string/inserters_extractors/char/8.cc
compilation failed to produce executable
FAIL: 21_strings/basic_string/inserters_extractors/char/9.cc (test for
excess errors)
WARNING: 21_strings/basic_string/inserters_extractors/char/9.cc
compilation failed to produce executable
FAIL: 21_strings/basic_string/inserters_extractors/pod/10081-in.cc (test
for excess errors)
WARNING: 21_strings/basic_string/inserters_extractors/pod/10081-in.cc
compilation failed to produce executable
FAIL: 21_strings/basic_string/inserters_extractors/pod/10081-out.cc
(test for excess errors)
WARNING: 21_strings/basic_string/inserters_extractors/pod/10081-out.cc
compilation failed to produce executable
which I suspect could be related to the recent ld changes: sorry, I
don't know at the moment which one. For instance, for char/6.cc:
/usr/bin/ld:
testsuite_abi.o(.text._ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20forward_iterator_tag[char*
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'
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
compiler exited with status 1
Can you have a look?
Thanks!
Paolo.
More information about the Libstdc++
mailing list