[all-commits] [llvm/llvm-project] 56ad9e: [AArch64][ELF] Support R_AARCH64_AUTH_ABS64 static...
Daniil Kovalev via All-commits
all-commits at lists.llvm.org
Thu Aug 24 08:59:52 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 56ad9e9171a4845ba18a7375321156c547bf5906
https://github.com/llvm/llvm-project/commit/56ad9e9171a4845ba18a7375321156c547bf5906
Author: Daniil Kovalev <dkovalev at accesssoftek.com>
Date: 2023-08-24 (Thu, 24 Aug 2023)
Changed paths:
M llvm/docs/PointerAuth.md
M llvm/include/llvm/BinaryFormat/ELFRelocs/AArch64.def
M llvm/lib/MC/MCExpr.cpp
M llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
M llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.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/MC/AArch64/elf-reloc-ptrauth.s
Log Message:
-----------
[AArch64][ELF] Support R_AARCH64_AUTH_ABS64 static relocation
The patch adds parser, MCExpr, and emitter support for the authenticated
pointer auth relocation.
In assembly, this is expressed using:
.quad <symbol>@AUTH(<key>, <discriminator> [, addr])
For example:
.quad _g3 at AUTH(ib, 1234, addr)
The optional 'addr' specifier represents whether the generated pointer
authentication code will also include address diversity (by blending the
address of the storage location of the relocated pointer with the
user-specified constant discriminator).
The @AUTH expression lowers to R_AARCH64_AUTH_ABS64 ELF relocation.
The signing schema is encoded in the place of relocation to be applied
as follows:
```
| 63 | 62 | 61:60 | 59:48 | 47:32 | 31:0 |
| ----------------- | -- | ----- | ----- | ------------- | ------ |
| address diversity | 0 | key | 0 | discriminator | addend |
```
See the following for details:
https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#static-relocations
Differential Revision: https://reviews.llvm.org/D156505
Co-authored-by: Ahmed Bougacha <ahmed at bougacha.org>
Co-authored-by: Peter Collingbourne <peter at pcc.me.uk>
More information about the All-commits
mailing list