aboutsummaryrefslogtreecommitdiff
path: root/gold/powerpc.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-11-04 16:35:51 +0000
committerIan Lance Taylor <ian@airs.com>2009-11-04 16:35:51 +0000
commit22b127cceb64a4a8dc7e62591746eb4c178eff9f (patch)
tree6e210da43d6ae53a6f79b55c30efdfc164f33e54 /gold/powerpc.cc
parentf5c870d25d59bc1e6fcb6a836b6bd1981788982c (diff)
downloadgdb-22b127cceb64a4a8dc7e62591746eb4c178eff9f.zip
gdb-22b127cceb64a4a8dc7e62591746eb4c178eff9f.tar.gz
gdb-22b127cceb64a4a8dc7e62591746eb4c178eff9f.tar.bz2
PR 10887
* arm.cc (Target_arm::do_finalize_sections): Don't add dynamic tags if data is discarded by linker script. * i386.cc (Target_i386::do_finalize_sections): Likewise. * powerpc.cc (Target_powerpc::do_finalize_sections): Likewise. * sparc.cc (Target_sparc::do_finalize_sections): Likewise. * x86_64.cc (Target_x86_64::do_finalize_sections): Likewise.
Diffstat (limited to 'gold/powerpc.cc')
-rw-r--r--gold/powerpc.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 0475f8e..8fe8877 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -1538,7 +1538,8 @@ Target_powerpc<size, big_endian>::do_finalize_sections(
Output_data_dynamic* const odyn = layout->dynamic_data();
if (odyn != NULL)
{
- 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);
@@ -1548,7 +1549,8 @@ Target_powerpc<size, big_endian>::do_finalize_sections(
odyn->add_section_address(elfcpp::DT_PLTGOT, this->plt_);
}
- if (this->rela_dyn_ != NULL)
+ if (this->rela_dyn_ != NULL
+ && this->rela_dyn_->output_section() != NULL)
{
const Output_data* od = this->rela_dyn_;
odyn->add_section_address(elfcpp::DT_RELA, od);