x86-64 prelink support for TLS dialect gnu2
Steven Newbury
steven.newbury@googlemail.com
Mon Nov 5 16:21:00 GMT 2018
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/
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
reached!
Can anybody help?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-support-for-R_X86_64_TLSDESC.patch
Type: text/x-patch
Size: 3003 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20181105/f3173084/attachment.bin>
More information about the Libc-alpha
mailing list