[all-commits] [llvm/llvm-project] 9dae7f: [PAC][CodeGen][ELF][AArch64] Support signed GOT (#...
Daniil Kovalev via All-commits
all-commits at lists.llvm.org
Wed Aug 7 01:53:21 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9dae7fcc927de7ae9878d4c32cb15770271fa8e3
https://github.com/llvm/llvm-project/commit/9dae7fcc927de7ae9878d4c32cb15770271fa8e3
Author: Daniil Kovalev <dkovalev at accesssoftek.com>
Date: 2024-08-07 (Wed, 07 Aug 2024)
Changed paths:
M llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
M llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
M llvm/lib/Target/AArch64/AArch64FastISel.cpp
M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
M llvm/lib/Target/AArch64/AArch64InstrInfo.td
M llvm/lib/Target/AArch64/AArch64MCInstLower.cpp
M llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.cpp
M llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
M llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
M llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
M llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp
M llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.cpp
M llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.h
A llvm/test/CodeGen/AArch64/ptrauth-basic-pic.ll
A llvm/test/CodeGen/AArch64/ptrauth-elf-globals-pic.ll
A llvm/test/CodeGen/AArch64/ptrauth-extern-weak.ll
A llvm/test/CodeGen/AArch64/ptrauth-got-abuse.ll
A llvm/test/CodeGen/AArch64/ptrauth-tagged-globals-pic.ll
A llvm/test/MC/AArch64/adrp-auth-relocation.s
M llvm/test/MC/AArch64/arm64-elf-relocs.s
M llvm/test/MC/AArch64/ilp32-diagnostics.s
Log Message:
-----------
[PAC][CodeGen][ELF][AArch64] Support signed GOT (#96164)
Depends on #96158 and #96159
Support the following relocations and assembly operators:
- `R_AARCH64_AUTH_ADR_GOT_PAGE` (`:got_auth:` for `adrp`)
- `R_AARCH64_AUTH_LD64_GOT_LO12_NC` (`:got_auth_lo12:` for `ldr`)
- `R_AARCH64_AUTH_GOT_ADD_LO12_NC` (`:got_auth_lo12:` for `add`)
`LOADgotAUTH` pseudo-instruction is introduced which is later expanded
to actual instruction sequence like the following.
```
adrp x16, :got_auth:sym
add x16, x16, :got_auth_lo12:sym
ldr x0, [x16]
autia x0, x16
```
If a resign is requested, like below, `LOADgotPAC` pseudo is used, and
GOT load is lowered similarly to `LOADgotAUTH`.
```
@var = global i32 0
define ptr @resign_globalvar() {
ret ptr ptrauth (ptr @var, i32 3, i64 43)
}
```
Both SelectionDAG and GlobalISel are suppported. For FastISel, we fall
back to SelectionDAG.
Tests starting with 'ptrauth-' have corresponding variants w/o this
prefix.
See also specification
https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#appendix-signed-got
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list