diff options
Diffstat (limited to 'gold/powerpc.cc')
-rw-r--r-- | gold/powerpc.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gold/powerpc.cc b/gold/powerpc.cc index 83bb992..cc46782 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -948,6 +948,11 @@ Target_powerpc<size, big_endian>::make_plt_entry(Symbol_table* symtab, // Create the GOT section first. this->got_section(symtab, layout); + // Ensure that .rela.dyn always appears before .rela.plt This is + // necessary due to how, on PowerPC and some other targets, .rela.dyn + // needs to include .rela.plt in it's range. + this->rela_dyn_section(layout); + this->plt_ = new Output_data_plt_powerpc<size, big_endian>(layout); layout->add_output_section_data(".plt", elfcpp::SHT_PROGBITS, (elfcpp::SHF_ALLOC @@ -1556,7 +1561,7 @@ Target_powerpc<size, big_endian>::do_finalize_sections( ? NULL : this->plt_->rel_plt()); layout->add_target_dynamic_tags(false, this->plt_, rel_plt, - this->rela_dyn_, true); + this->rela_dyn_, true, size == 32); // Emit any relocs we saved in an attempt to avoid generating COPY // relocs. |