HomeFreeBSD

Add relocation handling required for -zifunc-noplt to work on arm64.

Description

Add relocation handling required for -zifunc-noplt to work on arm64.

Static relocations for the immediate operand of a branch instruction
must be applied.

In a patch which implements LSE-based atomic(9) operations using ifuncs,
-zifunc-noplt reduces system CPU usage during a buildkernel by several
percent.

Also fix elf_reloc_internal() to return an error if symbol lookup fails.

Reviewed by: andrew
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17392

Details

Provenance
markjAuthored on
Reviewer
andrew
Differential Revision
D17392: Add arm64 kernel support for -z ifunc-noplt
Parents
rS356946: Regen.
Branches
Unknown
Tags
Unknown