[libc patch] __tls_get_addr with link_map * instead of modid

Rich Felker dalias@libc.org
Sat Oct 25 05:55:00 GMT 2014


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



More information about the Libc-alpha mailing list