This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Add TLS support to binutils (ia32 and ia64 for now)
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: binutils at sources dot redhat dot com, drepper at redhat dot com
- Date: Thu, 14 Feb 2002 00:02:10 +1030
- Subject: Re: [PATCH] Add TLS support to binutils (ia32 and ia64 for now)
- References: <20020212144744.M798@sunsite.ms.mff.cuni.cz>
Hi Jakub,
Some suggestions after a quick scan through the diff..
On Tue, Feb 12, 2002 at 02:47:44PM +0100, Jakub Jelinek wrote:
> +
> +#define local_got_tls_type(abfd, symsize, n) \
> + ((char *)(elf_local_got_refcounts (abfd) + (symsize)))[n]
A separate var, initialised when elf_local_got_refcounts is
allocated, would be better than the define.
> +/* Return the base VMA address which should be subtracted from real addresses
> + when resolving @dtpoff relocation.
> + This is PT_TLS segment p_vaddr. */
> +
> +static bfd_vma
> +dtpoff_base (abfd)
> + bfd *abfd;
Perhaps cache this, and tpoff, in elf_i386_link_hash_table?
> --- bfd/section.c.jj Mon Jan 14 17:02:48 2002
> +++ bfd/section.c Mon Jan 28 16:02:38 2002
> @@ -367,6 +367,11 @@ CODE_FRAGMENT
> .
> . {* End of section flags. *}
> .
> +. flagword flags2;
> +.
> +. {* The section contains thread local data. *}
> +.#define SEC_FLAG2_THREAD_LOCAL 1
I would rather see bit-fields than another flagword.
--
Alan Modra
IBM OzLabs - Linux Technology Centre