summaryrefslogtreecommitdiff
path: root/elf/circlemod2a.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2017-01-24 11:27:45 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2018-01-17 09:26:35 -0200
commit97dabd564b91e6d0bfacf9af8d34103347047f23 (patch)
tree358bc01d8417bc4a65f745374780363bb5394081 /elf/circlemod2a.c
parent4942c4ea48099b4ba9dfecf7cfbc452ae74811b5 (diff)
downloadglibc-azanella/aarch64-split-stack.tar.gz
aarch64: Add split-stack TCB fieldazanella/aarch64-split-stack
This patch adds split-stack support pointer guard on glibc for aarch64. Different from other architectures (powerpc, s390) where the memory is placed on TCB, aarch64 one is placed before thread pointer initial position. It has an advantage over extending TCB because for aarch64 TLS variable placement take in consideration tcbhead_t size and by changing its value would require to also update the static linker (and it would also add incompatibility with glibc and older linkers). For aarch64 tcb direct access is fastest for thread local variable on all mode and related TLS access. It requires just a direct load with displacement of -8 (since thread pointer points to tcbhead_t). It also adds a loader symbol (__tcb_private_ss) to signal the existence of the split stack guard area. Checked on aarch64-linux-gnu. * sysdeps/aarch64/Makefile [$(subdir) = elf] (sysdeps-dl-routines): Add tcb-version. * sysdeps/aarch64/Versions [ld] (GLIBC_2.26): Add __libc_tcb_private_ss. * sysdeps/aarch64/nptl/tls.h (tcbprehead_t): New struct. (TLS_PRE_TCB_SIZE): Take tcbprehead_t in consideration. (TLS_DEFINE_INIT_TP): Likewise. (THREAD_SELF): Likewise. (DB_THREAD_SELF): Likewise. * sysdeps/aarch64/tcb-version.c: New file. * sysdeps/unix/sysv/linux/aarch64/ld.abilist (GLIBC_2.26): Add. (__libc_tcb_private_ss): Likewise. * sysdeps/aarch64/nptl/tcb-offsets.sym (PTHREAD_SIZEOF): Rename to PTHREAD_PRE_TCB_SIZE.
Diffstat (limited to 'elf/circlemod2a.c')
0 files changed, 0 insertions, 0 deletions