[all-commits] [llvm/llvm-project] 614544: [PAC][compiler-rt] Fix init/fini array signing sch...
Daniil Kovalev via All-commits
all-commits at lists.llvm.org
Fri Aug 1 00:04:52 PDT 2025
Branch: refs/heads/release/21.x
Home: https://github.com/llvm/llvm-project
Commit: 614544048c713209b619f7a93763ce66dde620d3
https://github.com/llvm/llvm-project/commit/614544048c713209b619f7a93763ce66dde620d3
Author: Daniil Kovalev <dkovalev at accesssoftek.com>
Date: 2025-08-01 (Fri, 01 Aug 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.
(cherry picked from commit 19ba224fb8a925d095d84836bc9896bf564dfd99)
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