[all-commits] [llvm/llvm-project] dadf5b: [AArch64][PAC] Handle signing of init/fini pointer...

Anatoly Trosinenko via All-commits all-commits at lists.llvm.org
Fri Jun 12 08:06:32 PDT 2026


  Branch: refs/heads/users/atrosinenko/pauth-init-fini
  Home:   https://github.com/llvm/llvm-project
  Commit: dadf5bc5a9e61e644d9bf2753ddb108c17d17caa
      https://github.com/llvm/llvm-project/commit/dadf5bc5a9e61e644d9bf2753ddb108c17d17caa
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2026-06-12 (Fri, 12 Jun 2026)

  Changed paths:
    M clang/include/clang/Basic/PointerAuthOptions.h
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/test/CodeGen/ptrauth-init-fini.c
    M llvm/lib/IR/AutoUpgrade.cpp
    M llvm/lib/IR/Verifier.cpp
    M llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
    M llvm/lib/Target/AArch64/AArch64PointerAuth.h
    A llvm/test/CodeGen/AArch64/ptrauth-init-fini-autoupgrade.ll
    M llvm/test/CodeGen/AArch64/ptrauth-init-fini.ll

  Log Message:
  -----------
  [AArch64][PAC] Handle signing of init/fini pointers in AsmPrinter

Move signing of the contents of `@llvm.global_(ctors|dtors)` from
Clang frontend to the end of the backend pipeline, to AsmPrinter.

Signing of the pointers to init/fini functions in the backend fixes
registration of the constructors and destructors performed by the
optimizer or the backend.

This commit introduces two new module flags, `ptrauth-init-fini` and
`ptrauth-init-fini-address-discrimination`, mirroring corresponding
Clang options. The flags are semantically boolean, and the module
is allowed to have either none of these flags, only the first one,
or both. The particular constant discriminator to use is not
configurable via module flags and is hardcoded to the value 0xD9D4
in the `llvm/lib/Target/AArch64/AArch64PointerAuth.h` file.


  Commit: 593568efe82a32c196f2e19979b0455ee9d2efc3
      https://github.com/llvm/llvm-project/commit/593568efe82a32c196f2e19979b0455ee9d2efc3
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2026-06-12 (Fri, 12 Jun 2026)

  Changed paths:
    M llvm/lib/IR/AutoUpgrade.cpp

  Log Message:
  -----------
  Improve readability


  Commit: 044c9b73bffa30800bdb451e01598de313383f55
      https://github.com/llvm/llvm-project/commit/044c9b73bffa30800bdb451e01598de313383f55
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2026-06-12 (Fri, 12 Jun 2026)

  Changed paths:
    M llvm/lib/IR/AutoUpgrade.cpp
    M llvm/test/CodeGen/AArch64/ptrauth-init-fini-autoupgrade.ll

  Log Message:
  -----------
  Fix module flag name spelling in AutoUpgrade.cpp


Compare: https://github.com/llvm/llvm-project/compare/948daf1ceeef...044c9b73bffa

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