aboutsummaryrefslogtreecommitdiff
path: root/gold/arm.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/arm.cc')
-rw-r--r--gold/arm.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/gold/arm.cc b/gold/arm.cc
index 8998032..e0c4a9a 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -4252,10 +4252,12 @@ Target_arm<big_endian>::do_finalize_sections(
Output_data_dynamic* const odyn = layout->dynamic_data();
if (odyn != NULL)
{
- if (this->got_plt_ != NULL)
+ if (this->got_plt_ != NULL
+ && this->got_plt_->output_section() != NULL)
odyn->add_section_address(elfcpp::DT_PLTGOT, this->got_plt_);
- if (this->plt_ != NULL)
+ if (this->plt_ != NULL
+ && this->plt_->output_section() != NULL)
{
const Output_data* od = this->plt_->rel_plt();
odyn->add_section_size(elfcpp::DT_PLTRELSZ, od);
@@ -4263,7 +4265,8 @@ Target_arm<big_endian>::do_finalize_sections(
odyn->add_constant(elfcpp::DT_PLTREL, elfcpp::DT_REL);
}
- if (this->rel_dyn_ != NULL)
+ if (this->rel_dyn_ != NULL
+ && this->rel_dyn_->output_section() != NULL)
{
const Output_data* od = this->rel_dyn_;
odyn->add_section_address(elfcpp::DT_REL, od);