Files
clang-p2996/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp
Ahmed Bougacha 464fa3b3b0 [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 |
2024-08-16 11:59:27 -07:00

16 KiB