alpha: reject relocations that cannot refer to an IFUNC
Reject invalid relocation types that incorrectly attempt to reference an IFUNC directly.
This patch series introduces checks in the alpha ELF linker to reject specific relocation types that cannot correctly reference an IFUNC. These include R_ALPHA_BRADDR, R_ALPHA_BRSGP, gp-relative relocations, and R_ALPHA_REFLONG, which name the symbol directly or have insufficient field size. By reporting these errors, the linker ensures that all references to IFUNCs go through the appropriate GOT entry or data word that utilizes R_ALPHA_IRELATIVE.
In Details
This series of patches adds validation to the alpha ELF linker to prevent the use of certain relocation types (R_ALPHA_BRADDR, R_ALPHA_BRSGP, gp-relative, R_ALPHA_REFLONG) when referencing an IFUNC. These relocations attempt to resolve the IFUNC symbol directly, bypassing the intended mechanism which involves a GOT entry or an R_ALPHA_IRELATIVE relocation. The linker will now emit errors for these invalid combinations.