This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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][BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC


On Thu, Jun 19, 2014 at 11:29:44PM +0100, Maciej W. Rozycki wrote:
> Index: glibc-fsf-trunk-quilt/sysdeps/arm/dl-machine.h
> ===================================================================
> --- glibc-fsf-trunk-quilt.orig/sysdeps/arm/dl-machine.h	2014-06-19 22:24:23.731968218 +0100
> +++ glibc-fsf-trunk-quilt/sysdeps/arm/dl-machine.h	2014-06-19 22:25:06.741661376 +0100
> @@ -452,7 +452,10 @@ elf_machine_rel (struct link_map *map, c
>  	    else
>  # endif
>  	      {
> -		value = sym->st_value + td->argument.value;
> +		if (td->argument.value & 0x80000000)
> +		  value = sym->st_value;
> +		else
> +		  value = td->argument.value;

Can you explain why sym->st_value is completely ignored in the else
case? My understanding is that (aside from the high-bit-set condition
you found) td->argument.value is semantically an addend; I certainly
don't see any way it could already contain the desired symbol value
(offset).

Rich


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