diff --git a/glibc-sparc64-reloc.patch b/glibc-sparc64-reloc.patch new file mode 100644 index 0000000..3b9c8a6 --- /dev/null +++ b/glibc-sparc64-reloc.patch @@ -0,0 +1,36 @@ +@@ -, +, @@ + ChangeLog | 6 ++++++ + sysdeps/sparc/sparc64/dl-machine.h | 10 ++++++---- + 2 files changed, 12 insertions(+), 4 deletions(-) +--- a/ChangeLog ++++ a/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] +--- a/sysdeps/sparc/sparc64/dl-machine.h ++++ a/sysdeps/sparc/sparc64/dl-machine.h +@@ -513,11 +513,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 diff --git a/glibc.spec b/glibc.spec index 0b7de13..07a6c74 100644 --- a/glibc.spec +++ b/glibc.spec @@ -29,7 +29,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 2 +Release: 3 # GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries. # Things that are linked directly into dynamically linked programs # and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional @@ -43,6 +43,8 @@ Source1: %{glibcsrcdir}-fedora.tar.bz2 Patch0: %{name}-fedora.patch Patch1: %{name}-ia64-lib64.patch Patch2: sparc-shared-mapping.patch +Patch3: glibc-sparc64-reloc.patch + Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Obsoletes: glibc-profile < 2.4 Provides: ldconfig @@ -249,6 +251,7 @@ package or when debugging this package. %setup -q -n %{glibcsrcdir} -b1 %patch0 -E -p1 %patch2 -p1 +%patch3 -p1 %ifarch ia64 %if "%{_lib}" == "lib64" %patch1 -p1 @@ -1040,6 +1043,9 @@ rm -f *.filelist* %endif %changelog +* Thu Mar 09 2010 Dennis Gilmore - 2.11.1-3 +- add patch to fix sparc TLS reloc (BZ#571551). + * Wed Feb 10 2010 Dennis Gilmore - 2.11.1-2 - add sparc locale patch commited upstream to the fedora branch