When GCC defaults to PIE, compiling the conftest.S that is used to detect for assembler and linker STT_GNU_IFUNC support emits a relocation. This causes a false positive in the detection. Example on riscv64 with a toolchain defaulting to PIE: configure:4009: checking for assembler and linker STT_GNU_IFUNC support Relocation section '.rela.dyn' at offset 0x268 contains 1 entry: Offset Info Type Sym. Value Sym. Name + Addend 000000002000 000000000003 R_RISCV_RELATIVE 280 configure:4040: result: yes And with a toolchain not default to PIE: configure:4009: checking for assembler and linker STT_GNU_IFUNC support There are no relocations in this file. configure:4040: result: no The same is reproducible on MIPS.
R_MIPS_IRELATIVE is not defined (no non-preemptible IFUNC support) and no libc supports preemptible IFUNC... RISC-V is in the same boat..
The master branch has been updated by Adhemerval Zanella <azanella@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=87a698a21646b7ee620923ef5ffa9735471a8ddd commit 87a698a21646b7ee620923ef5ffa9735471a8ddd Author: Fangrui Song <maskray@google.com> 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 <aurelien@aurel32.net> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Fixed on 2.32.
*** Bug 22634 has been marked as a duplicate of this bug. ***