From: David S. Miller Date: Tue, 9 Mar 2010 11:48:24 +0000 (-0800) Subject: sparc64: Fix handling of R_SPARC_TLS_LE_* relocations. X-Git-Tag: fedora/glibc-2.11.1-4~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07a22357cbc30268a7f346cd288cf0ae7cb4f4cd;p=thirdparty%2Fglibc.git sparc64: Fix handling of R_SPARC_TLS_LE_* relocations. --- diff --git a/ChangeLog b/ChangeLog index b46b4417af4..b8e28237d79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-03-09 David S. Miller + + * 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. + 2009-10-27 Aurelien Jarno [BZ #10855] diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h index 3eee6729124..bc76c67817a 100644 --- a/sysdeps/sparc/sparc64/dl-machine.h +++ b/sysdeps/sparc/sparc64/dl-machine.h @@ -623,11 +623,13 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, value = sym->st_value - sym_map->l_tls_offset + reloc->r_addend; if (r_type == R_SPARC_TLS_LE_HIX22) - *reloc_addr = (*reloc_addr & 0xffc00000) - | (((~value) >> 10) & 0x3fffff); + *(unsigned int *)reloc_addr = + ((*(unsigned int *)reloc_addr & 0xffc00000) + | (((~value) >> 10) & 0x3fffff)); else - *reloc_addr = (*reloc_addr & 0xffffe000) | (value & 0x3ff) - | 0x1c00; + *(unsigned int *)reloc_addr = + ((*(unsigned int *)reloc_addr & 0xffffe000) | (value & 0x3ff) + | 0x1c00); } break; # endif