This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB 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: Carlos O'Donell <carlos at redhat dot com>, libc-alpha at sourceware dot org, gdb-patches at sourceware dot org
- Date: Sat, 25 Oct 2014 01:55:16 -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> <5449B78E dot 1060407 at redhat dot com> <20141024093834 dot GA24090 at host2 dot jankratochvil dot net> <544A60A5 dot 4020701 at redhat dot com> <20141024144014 dot GA2193 at host2 dot jankratochvil dot net>
On Fri, Oct 24, 2014 at 04:40:14PM +0200, Jan Kratochvil wrote:
> On Fri, 24 Oct 2014 16:22:29 +0200, Carlos O'Donell wrote:
> > What's wrong with using libthread_db to get the module ID and then you can
> > call the normal TLS functions
> +
> > Isn't a solution to use libthread_db to get the module ID from the link_map,
> > then use that with normal __tls_get_addr instead of adding to ld's API?
>
> I forgot about this possibility - that libthread_db would provide just the
> module ID (and not some per-thread address).
Why not just use dl_iterate_phdr to get the module id?
Rich