summaryrefslogtreecommitdiff
path: root/gold/x86_64.cc
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-05-01 09:00:14 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-05-01 09:00:27 -0700
commit48bc218262da3784dd5258b774832d6b36afcf93 (patch)
treeb5bad0b9fe86517bd7f618014e8ce5551e4e1538 /gold/x86_64.cc
parente977e74712cf8df6ff44ead0a5c0ffd3cb9aa065 (diff)
downloadbinutils-gdb-48bc218262da3784dd5258b774832d6b36afcf93.tar.gz
gold: Increment plt_offset after setting TLSDESC PLT entry
Increment plt_offset after setting the reserved TLSDESC PLT entry. PR gold/25872 * x86_64.cc (Output_data_plt_x86_64_bnd::do_write): Increment plt_offset after setting the reserved TLSDESC PLT entry. (Output_data_plt_x86_64_ibt<size>::do_write): Likewise.
Diffstat (limited to 'gold/x86_64.cc')
-rw-r--r--gold/x86_64.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index 6219c8e306f..114ebb081fd 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -2736,6 +2736,7 @@ Output_data_plt_x86_64_bnd::do_write(Output_file* of)
this->fill_tlsdesc_entry(pov, got_address, plt_address, got_base,
tlsdesc_got_offset, plt_offset);
pov += this->get_plt_entry_size();
+ plt_offset += plt_entry_size;
}
// Write the additional PLT.
@@ -2831,6 +2832,7 @@ Output_data_plt_x86_64_ibt<size>::do_write(Output_file* of)
this->fill_tlsdesc_entry(pov, got_address, plt_address, got_base,
tlsdesc_got_offset, plt_offset);
pov += this->get_plt_entry_size();
+ plt_offset += plt_entry_size;
}
// Write the additional PLT.