@@ -5,7 +5,7 @@ CFLAGS-backtrace.c += -funwind-tables
endif
ifeq ($(subdir),elf)
-sysdep-dl-routines += tlsdesc dl-tlsdesc
+sysdep-dl-routines += tlsdesc dl-tlsdesc tcb-version
gen-as-const-headers += dl-link.sym
endif
@@ -3,3 +3,11 @@ libc {
_mcount;
}
}
+
+ld {
+ GLIBC_2.25 {
+ # Symbol used to version control the private GLIBC TCB split-stack
+ # field.
+ __tcb_private_ss;
+ }
+}
@@ -47,6 +47,8 @@ typedef struct
{
dtv_t *dtv;
void *private;
+ /* GCC split stack support. */
+ void *__private_ss;
} tcbhead_t;
/* This is the size of the initial TCB. */
new file mode 100644
@@ -0,0 +1,24 @@
+/* Copyright (C) 2016 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* Symbol used to version control the private GLIBC TCB split-stack
+ field. */
+void
+__tcb_private_ss (void)
+{
+}
@@ -9,3 +9,5 @@ GLIBC_2.17 calloc F
GLIBC_2.17 free F
GLIBC_2.17 malloc F
GLIBC_2.17 realloc F
+GLIBC_2.25 GLIBC_2.24 A
+GLIBC_2.25 __tcb_private_ss F
From: Adhemerval Zanella <adhemerval.zanella@linaro.org> This patch adds a new TCB field meant to be used by GCC split-stack option. A new symbol, __tcb_private_ss, is also added to version control the private TCB field. For AArch64 the TCB access is the most efficient one, since for split-stack a per-thread variable is required and TLS initial-exec mode requires a GOT access. Checked on aarch64 and this is meant for 2.25. * sysdeps/aarch64/Makefile [$(subdir) == elf] (sysdep-dl-routines): Add tcb-version. * sysdeps/aarch64/Version [ld] (GLIBC_2.25): Define __tcb_private ss; * sysdeps/aarch64/nptl/tls.h (tcbhead_t): Add __private_ss field. * sysdeps/unix/sysv/linux/aarch64/ld.abilist: Add GLIBC_2.25 and __tcb_private_ss. * sysdeps/aarch64/tcb-version.c: New file. --- ChangeLog | 11 +++++++++++ sysdeps/aarch64/Makefile | 2 +- sysdeps/aarch64/Versions | 8 ++++++++ sysdeps/aarch64/nptl/tls.h | 2 ++ sysdeps/aarch64/tcb-version.c | 24 ++++++++++++++++++++++++ sysdeps/unix/sysv/linux/aarch64/ld.abilist | 2 ++ 6 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 sysdeps/aarch64/tcb-version.c