diff options
author | David S. Miller <davem@davemloft.net> | 2010-03-09 03:48:24 -0800 |
---|---|---|
committer | Andreas Schwab <schwab@redhat.com> | 2010-03-18 17:10:21 +0100 |
commit | 07a22357cbc30268a7f346cd288cf0ae7cb4f4cd (patch) | |
tree | e9ed6f95f2b4e2ee21308328500eaf1c6d5287ab | |
parent | a4889edbf47c0448479e03fb2d27c390d4cc825b (diff) |
sparc64: Fix handling of R_SPARC_TLS_LE_* relocations.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/dl-machine.h | 10 |
2 files changed, 12 insertions, 4 deletions
@@ -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. + 2009-10-27 Aurelien Jarno <aurelien@aurel32.net> [BZ #10855] diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h index 3eee672912..bc76c67817 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 |