From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1827) id 98CF93946C36; Tue, 12 May 2020 18:42:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 98CF93946C36 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Tulio Magno Quites Machado Filho To: glibc-cvs@sourceware.org Subject: [glibc/ibm/2.30/master] Improve IFUNC check [BZ #25506] X-Act-Checkin: glibc X-Git-Author: Fangrui Song X-Git-Refname: refs/heads/ibm/2.30/master X-Git-Oldrev: d53f5cac5012de3a2b947e86619d39a01784ed42 X-Git-Newrev: 75fa5fd7c37417b29d66294bee3431b9567416bf Message-Id: <20200512184232.98CF93946C36@sourceware.org> Date: Tue, 12 May 2020 18:42:32 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2020 18:42:32 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=75fa5fd7c37417b29d66294bee3431b9567416bf commit 75fa5fd7c37417b29d66294bee3431b9567416bf Author: Fangrui Song Date: Tue Feb 4 21:55:44 2020 -0800 Improve IFUNC check [BZ #25506] 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 Reviewed-by: Adhemerval Zanella (cherry picked from commit 87a698a21646b7ee620923ef5ffa9735471a8ddd) Diff: --- configure | 2 +- configure.ac | 2 +- 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