aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/aarch64/configure
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2020-10-26 15:48:01 +0000
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2020-11-02 09:39:24 +0000
commite156dabc766d6f6f99ce9402999eae380a3ec1f2 (patch)
treee57a3b9d8c12c24d04ee4507571fa967683cff7a /sysdeps/aarch64/configure
parent558251bd8785760ad40fcbfeaaee5d27fa5b0fe4 (diff)
downloadglibc-e156dabc766d6f6f99ce9402999eae380a3ec1f2.zip
glibc-e156dabc766d6f6f99ce9402999eae380a3ec1f2.tar.gz
glibc-e156dabc766d6f6f99ce9402999eae380a3ec1f2.tar.bz2
aarch64: Add variant PCS lazy binding test [BZ #26798]
This test fails without bug 26798 fixed because some integer registers likely get clobbered by lazy binding and variant PCS only allows x16 and x17 to be clobbered at call time. The test requires binutils 2.32.1 or newer for handling variant PCS symbols. SVE registers are not covered by this test, to avoid the complexity of handling multiple compile- and runtime feature support cases.
Diffstat (limited to 'sysdeps/aarch64/configure')
-rw-r--r--sysdeps/aarch64/configure40
1 files changed, 40 insertions, 0 deletions
diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure
index ac3cf6f..1f82237 100644
--- a/sysdeps/aarch64/configure
+++ b/sysdeps/aarch64/configure
@@ -255,3 +255,43 @@ if test $libc_cv_aarch64_pac_ret = yes; then
$as_echo "#define HAVE_AARCH64_PAC_RET 1" >>confdefs.h
fi
+
+# Check if binutils supports variant PCS symbols.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variant PCS support" >&5
+$as_echo_n "checking for variant PCS support... " >&6; }
+if ${libc_cv_aarch64_variant_pcs+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.S <<EOF
+.global foo
+.type foo, %function
+.variant_pcs foo
+foo:
+ ret
+.global bar
+.type bar, %function
+bar:
+ b foo
+EOF
+ libc_cv_aarch64_variant_pcs=no
+ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles $no_ssp -shared -fPIC -o conftest.so conftest.S'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } \
+ && { ac_try='$READELF -dW conftest.so | grep -q AARCH64_VARIANT_PCS'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+ then
+ libc_cv_aarch64_variant_pcs=yes
+ fi
+ rm -rf conftest.*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_aarch64_variant_pcs" >&5
+$as_echo "$libc_cv_aarch64_variant_pcs" >&6; }
+config_vars="$config_vars
+aarch64-variant-pcs = $libc_cv_aarch64_variant_pcs"