aboutsummaryrefslogtreecommitdiff
path: root/gold/i386.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2011-07-09 00:47:12 +0000
committerIan Lance Taylor <ian@airs.com>2011-07-09 00:47:12 +0000
commit191f1a2dccbc09da4c6cf7dc9b3ad5fa8520a4e8 (patch)
tree7896a4e6a125ecfba82f94c0b590ebd78aab92d5 /gold/i386.cc
parent2fbb75826aefed6034a6e9a785ee8503e93d2aef (diff)
downloadgdb-191f1a2dccbc09da4c6cf7dc9b3ad5fa8520a4e8.zip
gdb-191f1a2dccbc09da4c6cf7dc9b3ad5fa8520a4e8.tar.gz
gdb-191f1a2dccbc09da4c6cf7dc9b3ad5fa8520a4e8.tar.bz2
PR gold/11317
* target-reloc.h (issue_undefined_symbol_error): New inline function, broken out of relocate_section. (relocate_section): Call issue_undefined_symbol_error. * i386.cc (Target_i386::Relocate::relocate_tls): Don't crash if there is no TLS segment if we are about to issue an undefined symbol error. * x86_64.cc (Target_x86_64::relocate_tls): Likewise.
Diffstat (limited to 'gold/i386.cc')
-rw-r--r--gold/i386.cc27
1 files changed, 18 insertions, 9 deletions
diff --git a/gold/i386.cc b/gold/i386.cc
index 21d008c..8d3b630 100644
--- a/gold/i386.cc
+++ b/gold/i386.cc
@@ -2640,7 +2640,8 @@ Target_i386::Relocate::relocate_tls(const Relocate_info<32, false>* relinfo,
{
if (tls_segment == NULL)
{
- gold_assert(parameters->errors()->error_count() > 0);
+ gold_assert(parameters->errors()->error_count() > 0
+ || issue_undefined_symbol_error(gsym));
return;
}
this->tls_gd_to_le(relinfo, relnum, tls_segment,
@@ -2670,7 +2671,8 @@ Target_i386::Relocate::relocate_tls(const Relocate_info<32, false>* relinfo,
{
if (tls_segment == NULL)
{
- gold_assert(parameters->errors()->error_count() > 0);
+ gold_assert(parameters->errors()->error_count() > 0
+ || issue_undefined_symbol_error(gsym));
return;
}
this->tls_gd_to_ie(relinfo, relnum, tls_segment, rel, r_type,
@@ -2697,7 +2699,8 @@ Target_i386::Relocate::relocate_tls(const Relocate_info<32, false>* relinfo,
{
if (tls_segment == NULL)
{
- gold_assert(parameters->errors()->error_count() > 0);
+ gold_assert(parameters->errors()->error_count() > 0
+ || issue_undefined_symbol_error(gsym));
return;
}
this->tls_desc_gd_to_le(relinfo, relnum, tls_segment,
@@ -2736,7 +2739,8 @@ Target_i386::Relocate::relocate_tls(const Relocate_info<32, false>* relinfo,
{
if (tls_segment == NULL)
{
- gold_assert(parameters->errors()->error_count() > 0);
+ gold_assert(parameters->errors()->error_count() > 0
+ || issue_undefined_symbol_error(gsym));
return;
}
this->tls_desc_gd_to_ie(relinfo, relnum, tls_segment, rel, r_type,
@@ -2772,7 +2776,8 @@ Target_i386::Relocate::relocate_tls(const Relocate_info<32, false>* relinfo,
{
if (tls_segment == NULL)
{
- gold_assert(parameters->errors()->error_count() > 0);
+ gold_assert(parameters->errors()->error_count() > 0
+ || issue_undefined_symbol_error(gsym));
return;
}
this->tls_ld_to_le(relinfo, relnum, tls_segment, rel, r_type,
@@ -2807,7 +2812,8 @@ Target_i386::Relocate::relocate_tls(const Relocate_info<32, false>* relinfo,
{
if (tls_segment == NULL)
{
- gold_assert(parameters->errors()->error_count() > 0);
+ gold_assert(parameters->errors()->error_count() > 0
+ || issue_undefined_symbol_error(gsym));
return;
}
value -= tls_segment->memsz();
@@ -2823,7 +2829,8 @@ Target_i386::Relocate::relocate_tls(const Relocate_info<32, false>* relinfo,
{
if (tls_segment == NULL)
{
- gold_assert(parameters->errors()->error_count() > 0);
+ gold_assert(parameters->errors()->error_count() > 0
+ || issue_undefined_symbol_error(gsym));
return;
}
Target_i386::Relocate::tls_ie_to_le(relinfo, relnum, tls_segment,
@@ -2871,7 +2878,8 @@ Target_i386::Relocate::relocate_tls(const Relocate_info<32, false>* relinfo,
{
if (tls_segment == NULL)
{
- gold_assert(parameters->errors()->error_count() > 0);
+ gold_assert(parameters->errors()->error_count() > 0
+ || issue_undefined_symbol_error(gsym));
return;
}
value -= tls_segment->memsz();
@@ -2886,7 +2894,8 @@ Target_i386::Relocate::relocate_tls(const Relocate_info<32, false>* relinfo,
{
if (tls_segment == NULL)
{
- gold_assert(parameters->errors()->error_count() > 0);
+ gold_assert(parameters->errors()->error_count() > 0
+ || issue_undefined_symbol_error(gsym));
return;
}
value = tls_segment->memsz() - value;