[all-commits] [llvm/llvm-project] 19ba22: [PAC][compiler-rt] Fix init/fini array signing sch...

Daniil Kovalev via All-commits all-commits at lists.llvm.org
Mon Jul 28 21:29:25 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 19ba224fb8a925d095d84836bc9896bf564dfd99
      https://github.com/llvm/llvm-project/commit/19ba224fb8a925d095d84836bc9896bf564dfd99
  Author: Daniil Kovalev <dkovalev at accesssoftek.com>
  Date:   2025-07-29 (Tue, 29 Jul 2025)

  Changed paths:
    M compiler-rt/lib/builtins/crtbegin.c

  Log Message:
  -----------
  [PAC][compiler-rt] Fix init/fini array signing schema (#150691)

When `ptrauth_calls` is present but `ptrauth_init_fini` is not, compiler
emits raw unsigned pointers in `.init_array`/`.fini_array` sections.
Previously, `__do_init`/`__do_fini` pointers, which are explicitly added
to the sections, were implicitly signed (due to the presense of
`ptrauth_calls`), while all the other pointers in the sections were
implicitly added by the compiler and thus non-signed.. As a result, the
sections contained a mix of unsigned function pointers and function
pointers signed with default signing schema.

This patch introduces use of inline assembly for this particular case,
so we can manually specify that we do not want to sign the pointers.

Note that we cannot use `__builtin_ptrauth_strip` for this purpose since
its result is not a constant expression.



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