[PATCH] gold: Increment plt_offset after setting TLSDESC PLT entry

H.J. Lu hjl.tools@gmail.com
Fri May 1 15:51:07 GMT 2020


On Sat, Apr 25, 2020 at 8:24 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> 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.
> ---
>  gold/x86_64.cc | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/gold/x86_64.cc b/gold/x86_64.cc
> index b094e4bd3b..a0247b5707 100644
> --- a/gold/x86_64.cc
> +++ b/gold/x86_64.cc
> @@ -2764,6 +2764,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.
> @@ -2859,6 +2860,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.
> --
> 2.25.3
>

I am checking in this patch.

-- 
H.J.


More information about the Binutils mailing list