This is the mail archive of the
mailing list for the glibc project.
Re: x86-64 prelink support for TLS dialect gnu2
- From: Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>
- To: Steven Newbury <steven dot newbury at googlemail dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Cc: nd <nd at arm dot com>
- Date: Mon, 5 Nov 2018 18:02:58 +0000
- Subject: Re: x86-64 prelink support for TLS dialect gnu2
- References: <CAMZr8UrsztX+n5id7cTCR=QD93bHDK7=yj2_ujn0tAbEdkGngQ@mail.gmail.com>
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:
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 written the attached patch which enables prelink to recognise
> R_X86_64_TLSDESC relocations and do the same as is done currently for
> ARM. Unfortunately, while this seems to work, when a prelinked binary
> is loaded with a shared library with such a relocation it fails with:
> "error while loading shared libraries: unexpected reloc type 0x24".
> reloc type 0x24 is indeed R_X86_64_TLSDESC.
> The strange thing is the code in glibc which generates this error
> (sysdeps/x86_64/dl-machine.h) specifically handles R_X86_64_TLSDESC.
> I can't understand how it is falling through to _dl_reloc_bad_type ()
> with reloc 0x24 since in both instances the error case shouldn't be
> Can anybody help?