[PATCH] x86: Check invalid TLS descriptor call
H.J. Lu
hjl.tools@gmail.com
Sat Aug 31 11:48:51 GMT 2024
On Sat, Aug 31, 2024 at 4:07 AM Alexandre Oliva <oliva@gnu.org> wrote:
>
> On Aug 29, 2024, "H.J. Lu" <hjl.tools@gmail.com> wrote:
>
> > TLS descriptor call,
> > call *x@tlsdesc(%rax)
>
> > or
>
> > call *x@tlsdesc(%eax)
>
> > calls _dl_tlsdesc_return which expects that RAX/EAX points to the TLS
> > descriptor.
>
> But it doesn't follow that one must not use any other register that
> holds a copy of %[er]ax for the call, does it?
>
Did you mean that
lea foo@tlsdesc(%ebx), %eax
mov %eax, %ecx
call *foo@tlscall(%ecx)
also works?
--
H.J.
More information about the Binutils
mailing list