[clang] [llvm] [Clang][LLVM] Disable NonLazyBind when pointer authentication is enabled (PR #188638)
Oskar Wirga via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 27 00:59:05 PDT 2026
oskarwirga wrote:
Turns out there _is_ a fundamental reason NonLazyBind can't work on arm64e today: the MachO ABI has no relocation type for compiler-emitted auth GOT loads. `__auth_got` is entirely linker-internal; only linker-generated stubs reference it. Apple hasn't made this relocation available, so getting `NonLazyBind` working on arm64e would require an ABI extension that Apple controls.
Apple's own toolchain actually has this same bug! Xcode emits unsigned GOT loads on arm64e which is the same issue. Reproducible with:
```c
// repro.c
void external(void);
void caller(void) { external(); }
$ xcrun --sdk iphoneos clang -fno-plt -target arm64e-apple-ios16 -S -o - repro.c | grep grep -A3 blr -B3
.cfi_offset w29, -16
adrp x8, _external at GOTPAGE
ldr x8, [x8, _external at GOTPAGEOFF]
blr x8 <----- This is bad
ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
retab
.cfi_endproc
```
I think we keep this PR which suppresses NonLazyBind on arm64e. I've also updated the tests and gating to use arm64e naming.
https://github.com/llvm/llvm-project/pull/188638
More information about the llvm-commits
mailing list