Backport some upstream-wards patches to fix TLS issues on AArch64.

This commit is contained in:
Kyle McMartin 2014-05-21 22:06:41 -04:00
parent abfaca544c
commit b39b864460
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,35 @@
diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
index 997c860..50b37b0 100644
--- a/sysdeps/aarch64/dl-machine.h
+++ b/sysdeps/aarch64/dl-machine.h
@@ -295,7 +295,7 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
# ifndef SHARED
CHECK_STATIC_TLS (map, sym_map);
# else
- if (!TRY_STATIC_TLS (map, sym_map))
+ if (1)
{
td->arg = _dl_make_tlsdesc_dynamic
(sym_map, sym->st_value + reloc->r_addend);
diff --git a/sysdeps/aarch64/nptl/tls.h b/sysdeps/aarch64/nptl/tls.h
index ae2e6c4..8b260a1 100644
--- a/sysdeps/aarch64/nptl/tls.h
+++ b/sysdeps/aarch64/nptl/tls.h
@@ -63,7 +63,7 @@ typedef struct
# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
/* Alignment requirements for the initial TCB. */
-# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
+# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread)
/* This is the size of the TCB. */
# define TLS_TCB_SIZE sizeof (tcbhead_t)
@@ -72,7 +72,7 @@ typedef struct
# define TLS_PRE_TCB_SIZE sizeof (struct pthread)
/* Alignment requirements for the TCB. */
-# define TLS_TCB_ALIGN __alignof__ (tcbhead_t)
+# define TLS_TCB_ALIGN __alignof__ (struct pthread)
/* Install the dtv pointer. The pointer passed is to the element with
index -1 which contain the length. */

View File

@ -1,6 +1,6 @@
%define glibcsrcdir glibc-2.19-418-ga5d87b3 %define glibcsrcdir glibc-2.19-418-ga5d87b3
%define glibcversion 2.19.90 %define glibcversion 2.19.90
%define glibcrelease 16%{?dist} %define glibcrelease 17%{?dist}
# Pre-release tarballs are pulled in from git using a command that is # Pre-release tarballs are pulled in from git using a command that is
# effectively: # effectively:
# #
@ -224,6 +224,8 @@ Patch2031: %{name}-rh1070416.patch
# Upstream 16724 # Upstream 16724
Patch2032: %{name}-rh1078355.patch Patch2032: %{name}-rh1078355.patch
Patch2033: glibc-aarch64-tls-fixes.patch
############################################################################## ##############################################################################
# End of glibc patches. # End of glibc patches.
############################################################################## ##############################################################################
@ -554,6 +556,7 @@ package or when debugging this package.
%patch0047 -p1 %patch0047 -p1
%patch2032 -p1 %patch2032 -p1
%patch1000 -p1 %patch1000 -p1
%patch2033 -p1
############################################################################## ##############################################################################
# %%prep - Additional prep required... # %%prep - Additional prep required...
@ -1643,6 +1646,9 @@ rm -f *.filelist*
%endif %endif
%changelog %changelog
* Wed May 21 2014 Kyle McMartin <kyle@fedoraproject.org> - 2.19.90-17
- Backport some upstream-wards patches to fix TLS issues on AArch64.
* Wed May 21 2014 Kyle McMartin <kyle@fedoraproject.org> - 2.19.90-16 * Wed May 21 2014 Kyle McMartin <kyle@fedoraproject.org> - 2.19.90-16
- AArch64: Fix handling of nocancel syscall failures (#1098327) - AArch64: Fix handling of nocancel syscall failures (#1098327)