[all-commits] [llvm/llvm-project] 39fefb: [PAC][clang] Fix ptrauth module flags behavior (#2...
Daniil Kovalev via All-commits
all-commits at lists.llvm.org
Mon Jul 13 12:07:46 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 39fefb706834fa8e171b0c699b6e91e4d4a0d831
https://github.com/llvm/llvm-project/commit/39fefb706834fa8e171b0c699b6e91e4d4a0d831
Author: Daniil Kovalev <dkovalev at accesssoftek.com>
Date: 2026-07-13 (Mon, 13 Jul 2026)
Changed paths:
M clang/lib/CodeGen/CodeGenModule.cpp
M clang/test/CodeGen/AArch64/elf-pauthabi.c
M clang/test/CodeGen/ptrauth-module-flags.c
M clang/test/CodeGenCXX/pfp-memcpy.cpp
M llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
M llvm/test/CodeGen/AArch64/arm64-tls-dynamics.ll
M llvm/test/CodeGen/AArch64/basic-pic.ll
M llvm/test/CodeGen/AArch64/build-attributes-pauthabi.ll
M llvm/test/CodeGen/AArch64/elf-globals-pic.ll
M llvm/test/CodeGen/AArch64/extern-weak.ll
M llvm/test/CodeGen/AArch64/got-abuse.ll
M llvm/test/CodeGen/AArch64/note-gnu-property-elf-pauthabi.ll
M llvm/test/CodeGen/AArch64/ptrauth-elf-got-function-symbols.ll
M llvm/test/CodeGen/AArch64/tagged-globals-pic.ll
M llvm/test/CodeGen/AArch64/tiny-model-pic.ll
M llvm/test/CodeGen/AArch64/tiny-model-static.ll
Log Message:
-----------
[PAC][clang] Fix ptrauth module flags behavior (#204226)
The `Error` merge behavior only has effect when module flags values
mismatch, while it allows the flag being present in one module and
absent in another one. Thus, we were previously incorrectly treating
modules as compatible in case of presence of
`ptrauth-elf-got`/`ptrauth-sign-personality` in one module (meaning the
corresponding ptrauth feature is enabled) and its absence in another
module (meaning the corresponding ptrauth feature is disabled). Similar
problem was present for `aarch64-elf-pauthabi-{platform|version}` flags
as well.
This patch introduces the following.
1. Always emit `ptrauth-elf-got` module flag for AArch64 ELF targets and
`ptrauth-sign-personality` module flag for AArch64 Linux targets. The
value of the flags is either 0 or 1.
2. Always emit `aarch64-elf-pauthabi-platform` and
`aarch64-elf-pauthabi-version` module flags for AArch64 Linux targets
(with `aarch64-elf-pauthabi-platform` set to
`AARCH64_PAUTH_PLATFORM_LLVM_LINUX` constant). Previously, these were
only emitted with `aarch64-elf-pauthabi-version != 0` (0 value stands
for no ptrauth features enabled). To keep emitted binaries unchanged in
case of version value of 0, this case is filtered out by backend in
`AArch64AsmPrinter::emitStartOfAsmFile`.
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