https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83782
--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Alexandre Oliva from comment #8) > I'm running into some problems that are related with this PR. > > First off, on i686-linux-gnu with --enable-default-pie, attr-ifunc-3.c fails > to link with e.g. binutils 2.30 (the linker in Trisquel 9), from before > binutils commit 4ec0995016801cc5d5cf13baf6e10163861e6852. The error was > "relocation R_386_GOTOFF against STT_GNU_IFUNC symbol `foo' isn't supported". > > Using a binutils 2.38.50 from May 2022, it doesn't fail to link, but it > fails at runtime. The @GOTOFF relocation to the IFUNC appears to be handled > correctly only in PDEs. > -fpie -pie -O0 -m32 and -fpie -pie -O2 -m32 work for me with gcc.dg/attr-ifunc-3.c on Fedora 36 and binutils 20220703. Please provide the broken attr-ifunc-3.o and the command line used to compile it.