aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorVladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>2017-01-23 17:18:00 -0800
committerCary Coutant <ccoutant@gmail.com>2017-01-23 17:18:00 -0800
commit04bc2a285435a82c45e3417906374307eafacd90 (patch)
tree1d915b194a23603b21338d4fa1a3dbd89c20aa99 /gold
parentc1f59f8ff9462ce45a3287ea06382a97e561fed3 (diff)
downloadgdb-04bc2a285435a82c45e3417906374307eafacd90.zip
gdb-04bc2a285435a82c45e3417906374307eafacd90.tar.gz
gdb-04bc2a285435a82c45e3417906374307eafacd90.tar.bz2
Make the sh_info field of .rel.plt point to .plt (MIPS).
gold/ * mips.cc (Mips_output_data_plt::rel_plt): Remove const from return type. (Target_mips::make_plt_entry): Make the sh_info field of .rel.plt point to .plt.
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog7
-rw-r--r--gold/mips.cc6
2 files changed, 12 insertions, 1 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index c074564..d98ff0b 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,5 +1,12 @@
2017-01-23 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
+ * mips.cc (Mips_output_data_plt::rel_plt): Remove const from return
+ type.
+ (Target_mips::make_plt_entry): Make the sh_info field of .rel.plt
+ point to .plt.
+
+2017-01-23 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
+
PR gold/21054
* mips.cc (Mips_got_info::record_global_got_symbol): Don't add symbol
to the dynamic symbol table if it is forced to local visibility.
diff --git a/gold/mips.cc b/gold/mips.cc
index ca3dd00..56af570 100644
--- a/gold/mips.cc
+++ b/gold/mips.cc
@@ -2475,7 +2475,7 @@ class Mips_output_data_plt : public Output_section_data
add_entry(Mips_symbol<size>* gsym, unsigned int r_type);
// Return the .rel.plt section data.
- const Reloc_section*
+ Reloc_section*
rel_plt() const
{ return this->rel_; }
@@ -8521,6 +8521,10 @@ Target_mips<size, big_endian>::make_plt_entry(Symbol_table* symtab,
(elfcpp::SHF_ALLOC
| elfcpp::SHF_EXECINSTR),
this->plt_, ORDER_PLT, false);
+
+ // Make the sh_info field of .rel.plt point to .plt.
+ Output_section* rel_plt_os = this->plt_->rel_plt()->output_section();
+ rel_plt_os->set_info_section(this->plt_->output_section());
}
this->plt_->add_entry(gsym, r_type);