diff options
author | Cary Coutant <ccoutant@gmail.com> | 2016-01-11 23:57:44 -0800 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2016-01-11 23:58:28 -0800 |
commit | d21f123b0ead1806416cf0dafae12bec4cca8920 (patch) | |
tree | e7bb3b97fd199b76de698f77e923cda8bb5ba29c /gold/x86_64.cc | |
parent | b36d953bced0a4fecdde1823abac70ed7038ee95 (diff) | |
download | fsf-binutils-gdb-d21f123b0ead1806416cf0dafae12bec4cca8920.zip fsf-binutils-gdb-d21f123b0ead1806416cf0dafae12bec4cca8920.tar.gz fsf-binutils-gdb-d21f123b0ead1806416cf0dafae12bec4cca8920.tar.bz2 |
Fix internal error when applying TLSDESC relocations with no TLS segment.
gold/
PR gold/19353
* aarch64.cc (Target_aarch64::relocate_tls): Don't insist that
we have a TLS segment for GD-to-IE optimization.
* i386.cc (Target_i386::tls_gd_to_ie): Remove tls_segment parameter.
Adjust all calls.
(Target_i386::tls_desc_gd_to_ie): Likewise.
(Target_i386::relocate_tls): Don't insist that we have a TLS segment
for TLSDESC GD-to-IE optimizations.
* x86_64.cc (Target_x86_64::tls_gd_to_ie): Remove tls_segment parameter.
Adjust all calls.
(Target_x86_64::tls_desc_gd_to_ie): Likewise.
(Target_x86_64::relocate_tls): Don't insist that we have a TLS segment
for TLSDESC GD-to-IE optimizations.
Diffstat (limited to 'gold/x86_64.cc')
-rw-r--r-- | gold/x86_64.cc | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/gold/x86_64.cc b/gold/x86_64.cc index 3cfc064..4ad5afc 100644 --- a/gold/x86_64.cc +++ b/gold/x86_64.cc @@ -816,7 +816,6 @@ class Target_x86_64 : public Sized_target<size, false> // Do a TLS General-Dynamic to Initial-Exec transition. inline void tls_gd_to_ie(const Relocate_info<size, false>*, size_t relnum, - Output_segment* tls_segment, const elfcpp::Rela<size, false>&, unsigned int r_type, typename elfcpp::Elf_types<size>::Elf_Addr value, unsigned char* view, @@ -835,7 +834,6 @@ class Target_x86_64 : public Sized_target<size, false> // Do a TLSDESC-style General-Dynamic to Initial-Exec transition. inline void tls_desc_gd_to_ie(const Relocate_info<size, false>*, size_t relnum, - Output_segment* tls_segment, const elfcpp::Rela<size, false>&, unsigned int r_type, typename elfcpp::Elf_types<size>::Elf_Addr value, unsigned char* view, @@ -3733,7 +3731,7 @@ Target_x86_64<size>::Relocate::relocate_tls( if (optimized_type == tls::TLSOPT_TO_IE) { value = target->got_plt_section()->address() + got_offset; - this->tls_gd_to_ie(relinfo, relnum, tls_segment, rela, r_type, + this->tls_gd_to_ie(relinfo, relnum, rela, r_type, value, view, address, view_size); break; } @@ -3800,14 +3798,8 @@ Target_x86_64<size>::Relocate::relocate_tls( } if (optimized_type == tls::TLSOPT_TO_IE) { - if (tls_segment == NULL) - { - gold_assert(parameters->errors()->error_count() > 0 - || issue_undefined_symbol_error(gsym)); - return; - } value = target->got_plt_section()->address() + got_offset; - this->tls_desc_gd_to_ie(relinfo, relnum, tls_segment, + this->tls_desc_gd_to_ie(relinfo, relnum, rela, r_type, value, view, address, view_size); break; @@ -3973,7 +3965,6 @@ inline void Target_x86_64<size>::Relocate::tls_gd_to_ie( const Relocate_info<size, false>* relinfo, size_t relnum, - Output_segment*, const elfcpp::Rela<size, false>& rela, unsigned int, typename elfcpp::Elf_types<size>::Elf_Addr value, @@ -4085,7 +4076,6 @@ inline void Target_x86_64<size>::Relocate::tls_desc_gd_to_ie( const Relocate_info<size, false>* relinfo, size_t relnum, - Output_segment*, const elfcpp::Rela<size, false>& rela, unsigned int r_type, typename elfcpp::Elf_types<size>::Elf_Addr value, |