This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: x86-64 prelink support for TLS dialect gnu2
- From: Steven Newbury <steven dot newbury at googlemail dot com>
- To: Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, nd <nd at arm dot com>
- Date: Mon, 5 Nov 2018 19:32:37 +0000
- Subject: Re: x86-64 prelink support for TLS dialect gnu2
- References: <CAMZr8UrsztX+n5id7cTCR=QD93bHDK7=yj2_ujn0tAbEdkGngQ@mail.gmail.com> <c61318f6-033e-cb2d-4201-51cc4ac745fa@arm.com>
On 05/11/2018, Szabolcs Nagy <Szabolcs.Nagy@arm.com> wrote:
> On 05/11/18 16:21, Steven Newbury wrote:
>> I'm working on gettting TLS gnu2 dialect support working for x86-64
>> with prelink. Yes, it's still maintained, see:
>> https://git.yoctoproject.org/cgit/cgit.cgi/prelink-cross/
>>
>
> prelinking for tlsdesc was never supported in ld.so
> on any target.
>
> at some point arm had support in case of lazy binding,
> but now lazy binding of tlsdesc is disabled on arm
> so that code got removed:
>
I've been comparing the removed code to what is currently in the
x86_64 dl-machine.h and it's almost identical, which makes sense since
x86_64 still supports lazy binding of tlsdesc AFAIK. The only notable
difference that I see is:
Removed ARM support code
- if (l->l_info[ADDRIDX (DT_TLSDESC_GOT)] && lazy)
- *(Elf32_Addr*)(D_PTR (l, l_info[ADDRIDX (DT_TLSDESC_GOT)]) + l->l_addr)
- = (Elf32_Addr) &_dl_tlsdesc_lazy_resolver;
Currently in x86_64
if (l->l_info[ADDRIDX (DT_TLSDESC_GOT)] && lazy)
*(ElfW(Addr)*)(D_PTR (l, l_info[ADDRIDX (DT_TLSDESC_GOT)]) + l->l_addr)
= (ElfW(Addr)) &_dl_tlsdesc_resolve_rela;
Am I looking in the right place?