diff options
Diffstat (limited to 'gold/layout.cc')
-rw-r--r-- | gold/layout.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gold/layout.cc b/gold/layout.cc index dc7cd13..a865909 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -3215,7 +3215,8 @@ Layout::create_interp(const Target* target) // If PLT_GOT is not NULL, then DT_PLTGOT points to it. // If PLT_REL is not NULL, it is used for DT_PLTRELSZ, and DT_JMPREL, -// and we also set DT_PLTREL. +// and we also set DT_PLTREL. We use PLT_REL's output section, since +// some targets have multiple reloc sections in PLT_REL. // If DYN_REL is not NULL, it is used for DT_REL/DT_RELA, // DT_RELSZ/DT_RELASZ, DT_RELENT/DT_RELAENT. @@ -3238,8 +3239,8 @@ Layout::add_target_dynamic_tags(bool use_rel, const Output_data* plt_got, if (plt_rel != NULL && plt_rel->output_section() != NULL) { - odyn->add_section_size(elfcpp::DT_PLTRELSZ, plt_rel); - odyn->add_section_address(elfcpp::DT_JMPREL, plt_rel); + odyn->add_section_size(elfcpp::DT_PLTRELSZ, plt_rel->output_section()); + odyn->add_section_address(elfcpp::DT_JMPREL, plt_rel->output_section()); odyn->add_constant(elfcpp::DT_PLTREL, use_rel ? elfcpp::DT_REL : elfcpp::DT_RELA); } |