[PATCH/AARCH64] Fix TLS for ILP32

Yufeng Zhang Yufeng.Zhang@arm.com
Wed Aug 14 17:49:00 GMT 2013


Look OK to me, but I cannot approve.

Thanks,
Yufeng

On 08/13/13 01:33, Andrew Pinski wrote:
> Hi,
>    In ILP32, the thread control block is 2 pointers or 4 byte in size.
> This patch fixes the code so that it uses the correct offset for the
> TLS variables.
>
> OK?  Built and tested on aarch64-linux-gnu with no regressions.
>
> Thanks,
> Andrew
>
> ChangeLog:
> * elfnn-aarch64.c (TCB_SIZE): Base on the ARCH_SIZE rather than a
> fixed size of 16.
>
>
> fixtlsilp32.diff.txt
>
>
> ? bfd/.elfnn-aarch64.c.swp
> Index: bfd/elfnn-aarch64.c
> ===================================================================
> RCS file: /cvs/src/src/bfd/elfnn-aarch64.c,v
> retrieving revision 1.9
> diff -u -p -r1.9 elfnn-aarch64.c
> --- bfd/elfnn-aarch64.c	28 Jul 2013 03:29:41 -0000	1.9
> +++ bfd/elfnn-aarch64.c	13 Aug 2013 00:33:05 -0000
> @@ -1666,8 +1666,8 @@ _aarch64_elf_section_data;
>   #define elf_aarch64_section_data(sec) \
>     ((_aarch64_elf_section_data *) elf_section_data (sec))
>
> -/* The size of the thread control block.  */
> -#define TCB_SIZE	16
> +/* The size of the thread control block which is defined to be two pointers.  */
> +#define TCB_SIZE	(ARCH_SIZE/8)*2
>
>   struct elf_aarch64_local_symbol
>   {
>




More information about the Binutils mailing list