From 90e5dd482fc4708d559fbec9740104470ffdb9df Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Fri, 20 Jun 2014 20:08:03 +0100 Subject: [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC This fixes the calculation of R_ARM_TLS_DESC relocations for lazy global symbol references, i.e. created with `-z lazy' in effect with the static linker, where immediate resolution is requested with LD_BIND_NOW. --- sysdeps/arm/configure | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'sysdeps/arm/configure') diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure index d79ef76..953ef44 100644 --- a/sysdeps/arm/configure +++ b/sysdeps/arm/configure @@ -203,3 +203,39 @@ else config_vars="$config_vars default-abi = soft" fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the build tools support the GNU descriptor TLS scheme" >&5 +$as_echo_n "checking whether the build tools support the GNU descriptor TLS scheme... " >&6; } +if ${libc_cv_arm_tls_desc+:} false; then : + $as_echo_n "(cached) " >&6 +else + old_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -mtls-dialect=gnu2" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +asm (".word\tfoo(tlsdesc)"); +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + libc_cv_arm_tls_desc=yes +else + libc_cv_arm_tls_desc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$old_CFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_tls_desc" >&5 +$as_echo "$libc_cv_arm_tls_desc" >&6; } +if test $libc_cv_arm_tls_desc = yes; then + config_vars="$config_vars +have-arm-tls-desc = yes" +else + config_vars="$config_vars +have-arm-tls-desc = no" +fi -- cgit v1.1