sparc64: Fix handling of R_SPARC_TLS_LE_* relocations.

This commit is contained in:
David S. Miller 2010-03-09 03:48:24 -08:00
parent 058e9ba9fd
commit d6d1c4c87c
2 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2010-03-09 David S. Miller <davem@davemloft.net>
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Handling
of R_SPARC_TLS_LE_* needs to use 32-bit loads and stores, not
64-bit ones.
2010-03-07 Ulrich Drepper <drepper@redhat.com> 2010-03-07 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags): * sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags):

View File

@ -513,11 +513,13 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
value = sym->st_value - sym_map->l_tls_offset value = sym->st_value - sym_map->l_tls_offset
+ reloc->r_addend; + reloc->r_addend;
if (r_type == R_SPARC_TLS_LE_HIX22) if (r_type == R_SPARC_TLS_LE_HIX22)
*reloc_addr = (*reloc_addr & 0xffc00000) *(unsigned int *)reloc_addr =
| (((~value) >> 10) & 0x3fffff); ((*(unsigned int *)reloc_addr & 0xffc00000)
| (((~value) >> 10) & 0x3fffff));
else else
*reloc_addr = (*reloc_addr & 0xffffe000) | (value & 0x3ff) *(unsigned int *)reloc_addr =
| 0x1c00; ((*(unsigned int *)reloc_addr & 0xffffe000) | (value & 0x3ff)
| 0x1c00);
} }
break; break;
# endif # endif