This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add TLS support to binutils (ia32 and ia64 for now)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]