Re: [PATCH] alpha: enable gnu-indirect-function support for alpha-linux

Jeffrey Law <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>

On 8/9/2026 1:58 PM, Matt Turner wrote:
> Add alpha*-* to the list of targets that default to
> --enable-gnu-indirect-function on glibc-based Linux systems.  This
> sets HAVE_GNU_INDIRECT_FUNCTION=1, making targetm.has_ifunc_p() return
> true and enabling __attribute__((ifunc)) support.
>
> No Alpha backend changes are needed — the generic ifunc machinery in
> varasm.cc handles emission, and alpha/elf.h already provides the
> required ASM_OUTPUT_TYPE_DIRECTIVE and ASM_OUTPUT_DEF macros.
>
> Requires binutils support for R_ALPHA_IRELATIVE and glibc dynamic
> linker support for the new relocation.
>
> The binutils patch series adding STT_GNU_IFUNC and R_ALPHA_IRELATIVE
> support has been sent to the binutils list:
>
>    https://sourceware.org/pipermail/binutils/2026-August/150713.html
>
> glibc dynamic linker support for R_ALPHA_IRELATIVE will follow.
>
> Tested by cross-compiling gcc.dg/attr-ifunc-{1..5}.c and
> g++.dg/ext/attr-ifunc-{1..5}.C targeting alpha-linux-gnu.  GCC
> correctly emits .type foo, @gnu_indirect_function and the resulting
> binaries contain STT_GNU_IFUNC symbols.  Runtime tests require the
> pending glibc dynamic linker patch.
But doesn't this mean that the compiler is reliant upon an unreleased 
version of binutils?  Which implies we probably need to do an assembler 
feature test?

Or am I missing something here?

jeff
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.