aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/MachOObjectFile.cpp
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed@bougacha.org>2024-08-16 11:58:59 -0700
committerAhmed Bougacha <ahmed@bougacha.org>2024-08-16 11:59:27 -0700
commit464fa3b3b047518699689b57c473c87701986593 (patch)
treeb95f6311da4f18f6d06cf515e04c8b375aef7cfc /llvm/lib/Object/MachOObjectFile.cpp
parente6b9f12b0ac0f1e6f7f7145719092c10731e4fe4 (diff)
downloadllvm-464fa3b3b047518699689b57c473c87701986593.zip
llvm-464fa3b3b047518699689b57c473c87701986593.tar.gz
llvm-464fa3b3b047518699689b57c473c87701986593.tar.bz2
[AArch64][MachO] Encode @AUTH to ARM64_RELOC_AUTHENTICATED_POINTER.
This adds MachO support for emission of authenticated pointer relocations. We already support AArch64AuthMCExpr, to represent assembly expressions such as: .quad <symbol>@AUTH(<key>, <discriminator> [, addr]) For example: .quad _g3@AUTH(ib, 1234, addr) These @AUTH expressions lower to a new kind of MachO relocation: ARM64_RELOC_AUTHENTICATED_POINTER (11) The relocation points to the referenced symbol. The other data, describing the signing scheme and original addend (only 32 bits instead of 64), is encoded into the addend (in the relocated location): |63|62|61-51|50-49| 48 |47 - 32|31 - 0| | 1| 0| 0 | key | addr | discriminator | addend |
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
-rw-r--r--llvm/lib/Object/MachOObjectFile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp
index ff55a84..e2d1723 100644
--- a/llvm/lib/Object/MachOObjectFile.cpp
+++ b/llvm/lib/Object/MachOObjectFile.cpp
@@ -2341,7 +2341,7 @@ void MachOObjectFile::getRelocationTypeName(
"ARM64_RELOC_PAGEOFF12", "ARM64_RELOC_GOT_LOAD_PAGE21",
"ARM64_RELOC_GOT_LOAD_PAGEOFF12", "ARM64_RELOC_POINTER_TO_GOT",
"ARM64_RELOC_TLVP_LOAD_PAGE21", "ARM64_RELOC_TLVP_LOAD_PAGEOFF12",
- "ARM64_RELOC_ADDEND"
+ "ARM64_RELOC_ADDEND", "ARM64_RELOC_AUTHENTICATED_POINTER"
};
if (RType >= std::size(Table))