summaryrefslogtreecommitdiff
path: root/gold/output.h
diff options
context:
space:
mode:
Diffstat (limited to 'gold/output.h')
-rw-r--r--gold/output.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gold/output.h b/gold/output.h
index e704213b0cb..ef6fea185c6 100644
--- a/gold/output.h
+++ b/gold/output.h
@@ -1458,7 +1458,8 @@ class Output_data_reloc_base : public Output_data_reloc_generic
{
this->relocs_.push_back(reloc);
this->set_current_data_size(this->relocs_.size() * reloc_size);
- od->add_dynamic_reloc();
+ if (dynamic)
+ od->add_dynamic_reloc();
if (reloc.is_relative())
this->bump_relative_reloc_count();
Sized_relobj<size, big_endian>* relobj = reloc.get_relobj();