This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH-v2] powerpc: Provide __tls_get_addr () in static libc.
- From: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- To: Carlos Eduardo Seo <cseo at linux dot vnet dot ibm dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Andreas Schwab <schwab at suse dot de>, "Steven J. Munroe" <sjmunroe at us dot ibm dot com>
- Cc:
- Date: Wed, 28 Oct 2015 11:31:08 -0200
- Subject: Re: [PATCH-v2] powerpc: Provide __tls_get_addr () in static libc.
- Authentication-results: sourceware.org; auth=none
- References: <1D6755D1-C582-49CB-87F4-A0381A466F44 at linux dot vnet dot ibm dot com>
Carlos Eduardo Seo <cseo@linux.vnet.ibm.com> writes:
> Since '--no-tls-optimize' is available for Power in ld, we need to provide
> __tls_get_addr () in static libc in order to avoid undefined references to this
> symbol when that flag is used.
>
> 2015-10-08 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
>
> * sysdeps/powerpc/libc-tls.c: New file. Provides __tls_get_addr () in
> static libc.
> ...
> +void *
> +__tls_get_addr (tls_index *ti)
> +{
> + dtv_t *dtv = THREAD_DTV ();
> + return (char *) dtv[1].pointer.val + ti->ti_offset + TLS_DTV_OFFSET;
> +}
> +
Just a minor glitch: your editor added an extra blank line at EOF.
I removed it and will push this patch.
Thanks!
--
Tulio Magno