From 48bc218262da3784dd5258b774832d6b36afcf93 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 1 May 2020 09:00:14 -0700 Subject: 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::do_write): Likewise. --- gold/ChangeLog | 7 +++++++ gold/x86_64.cc | 2 ++ 2 files changed, 9 insertions(+) (limited to 'gold') diff --git a/gold/ChangeLog b/gold/ChangeLog index cc62a3e..c1cee52 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,6 +1,13 @@ 2020-05-01 H.J. Lu 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::do_write): Likewise. + +2020-05-01 H.J. Lu + + PR gold/25872 * x86_64.cc (Output_data_plt_x86_64_bnd::do_address_for_local): Handle local IFUNC symbol. (Output_data_plt_x86_64_ibt::do_address_for_local): Likewise. diff --git a/gold/x86_64.cc b/gold/x86_64.cc index 6219c8e..114ebb0 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::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. -- cgit v1.1