[PATCH][BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC
Rich Felker
dalias@libc.org
Fri Jun 20 02:41:00 GMT 2014
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
More information about the Libc-alpha
mailing list