[PATCH] Add TLS support to binutils (ia32 and ia64 for now)
Alan Modra
amodra@bigpond.net.au
Wed Feb 13 07:55:00 GMT 2002
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
More information about the Binutils
mailing list