This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [libc patch] __tls_get_addr with link_map * instead of modid
- From: Rich Felker <dalias at libc dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: libc-alpha at sourceware dot org, gdb-patches at sourceware dot org
- Date: Sat, 18 Oct 2014 17:44:25 -0400
- Subject: Re: [libc patch] __tls_get_addr with link_map * instead of modid
- Authentication-results: sourceware.org; auth=none
- References: <20141018201540 dot GA26252 at host2 dot jankratochvil dot net> <20141018212048 dot GH32028 at brightrain dot aerifal dot cx> <20141018212727 dot GA27805 at host2 dot jankratochvil dot net>
On Sat, Oct 18, 2014 at 11:27:27PM +0200, Jan Kratochvil wrote:
> On Sat, 18 Oct 2014 23:20:48 +0200, Rich Felker wrote:
> > > Additionally one could also fetch the module id from R_X86_64_DTPMOD64 but that
> > > would require arch specific code in GDB. I do not plan to implement this way.
> >
> > I don't see how this would work; how would you request the dynamic
> > linker to resolve that for you?
>
> When the inferior is running the relocation is already resolved. So GDB can
This is only the case if the module actually has a relocation for
local TLS contained in it. I'm not sure how you could assume this is
always the case, but maybe in cases where it's not true there's no
reasonable way you'd want to access TLS in that way.
Rich