[glibc] 01/01: patches/hurd-i386/tg2.25-tls.diff: new patch
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch glibc-2.25
in repository glibc.
commit 185dca9754f55d8545d19a5304922a09748dad1f
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Thu Aug 3 22:20:53 2017 +0200
patches/hurd-i386/tg2.25-tls.diff: new patch
---
debian/changelog | 1 +
debian/patches/hurd-i386/tg2.25-tls.diff | 39 ++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 41 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 37ec2ab..ce00428 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ glibc (2.25-0experimental1) UNRELEASED; urgency=medium
* patches/hurd-i386/cvs-libc_init_secure.diff: new patch.
* patches/hurd-i386/cvs-libpthread.diff: update.
* patches/hurd-i386/submitted-tst-rfc3484.diff: new patch.
+ * patches/hurd-i386/tg2.25-tls.diff: new patch.
* testsuite-xfail-debian.mk: update for hurd-i386.
-- Aurelien Jarno <aurel32@debian.org> Wed, 02 Aug 2017 19:03:14 +0200
diff --git a/debian/patches/hurd-i386/tg2.25-tls.diff b/debian/patches/hurd-i386/tg2.25-tls.diff
new file mode 100644
index 0000000..abdf290
--- /dev/null
+++ b/debian/patches/hurd-i386/tg2.25-tls.diff
@@ -0,0 +1,39 @@
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Subject: [PATCH] Fix tls support for glibc 2.25
+
+* csu/libc-start.c (LIBC_START_MAIN) [__GNU__]: Do not call
+__libc_setup_tls.
+* sysdeps/mach/hurd/i386/init-first.c (init): Call __libc_setup_tls.
+
+Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+---
+ csu/libc-start.c | 2 ++
+ sysdeps/mach/hurd/i386/init-first.c | 3 ++-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+--- a/csu/libc-start.c
++++ b/csu/libc-start.c
+@@ -185,8 +185,10 @@ LIBC_START_MAIN (int (*main) (int, char
+ /* Perform IREL{,A} relocations. */
+ apply_irel ();
+
++#ifndef __GNU__
+ /* The stack guard goes into the TCB, so initialize it early. */
+ __libc_setup_tls ();
++#endif
+
+ /* Set up the stack checker's canary. */
+ uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard (_dl_random);
+--- a/sysdeps/mach/hurd/i386/init-first.c
++++ b/sysdeps/mach/hurd/i386/init-first.c
+@@ -197,7 +197,8 @@ init (int *data)
+ assert (d->phdrsz % sizeof (ElfW(Phdr)) == 0);
+ }
+
+- /* We need to setup TLS before starting sigthread */
++ /* We need to setup TLS before starting sigthread and set stack guard. */
++ __libc_setup_tls ();
+ extern void __pthread_initialize_minimal(void);
+ __pthread_initialize_minimal();
+ #endif
diff --git a/debian/patches/series b/debian/patches/series
index 948c91a..2273e01 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -137,6 +137,7 @@ hurd-i386/tg-mlockall.diff
hurd-i386/submitted-shm_open_pthread.diff
hurd-i386/cvs-libc_init_secure.diff
hurd-i386/submitted-tst-rfc3484.diff
+hurd-i386/tg2.25-tls.diff
i386/local-biarch.diff
i386/local-cmov.diff
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-glibc/glibc.git
Reply to: