aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-02-04 21:55:44 -0800
committerAndreas K. Huettel <dilfridge@gentoo.org>2020-03-09 11:50:20 +0100
commit2985881f789654344a1a8dc4a6c928d9961cde39 (patch)
tree74d5614204900a4ef26539fab1d91833212cbc80
parentmalloc/tst-mallocfork2: Kill lingering process for unexpected failures (diff)
downloadglibc-2985881f789654344a1a8dc4a6c928d9961cde39.tar.gz
glibc-2985881f789654344a1a8dc4a6c928d9961cde39.tar.bz2
glibc-2985881f789654344a1a8dc4a6c928d9961cde39.zip
Improve IFUNC check [BZ #25506]gentoo/glibc-2.30-6
GNU ld's RISCV port does not support IFUNC. ld -no-pie produces no relocation and the test passed incorrectly. Be more rigid by testing IRELATIVE explicitly. Tested-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> (cherry picked from commit 87a698a21646b7ee620923ef5ffa9735471a8ddd) (cherry picked from commit 75fa5fd7c37417b29d66294bee3431b9567416bf)
-rwxr-xr-xconfigure2
-rw-r--r--configure.ac2
2 files changed, 2 insertions, 2 deletions
diff --git a/configure b/configure
index 6d26b8246f..83ae6899c5 100755
--- a/configure
+++ b/configure
@@ -4035,7 +4035,7 @@ if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
-o conftest conftest.S 1>&5 2>&5; then
# Do a link to see if the backend supports IFUNC relocs.
$READELF -r conftest 1>&5
- LC_ALL=C $READELF -r conftest | grep 'no relocations' >/dev/null || {
+ LC_ALL=C $READELF -Wr conftest | grep -q 'IRELATIVE\|R_SPARC_JMP_IREL' && {
libc_cv_ld_gnu_indirect_function=yes
}
fi
diff --git a/configure.ac b/configure.ac
index 7436485419..51b85359ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -648,7 +648,7 @@ if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
-o conftest conftest.S 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
# Do a link to see if the backend supports IFUNC relocs.
$READELF -r conftest 1>&AS_MESSAGE_LOG_FD
- LC_ALL=C $READELF -r conftest | grep 'no relocations' >/dev/null || {
+ LC_ALL=C $READELF -Wr conftest | grep -q 'IRELATIVE\|R_SPARC_JMP_IREL' && {
libc_cv_ld_gnu_indirect_function=yes
}
fi