[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.
Daniel Kiss via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 29 05:56:46 PDT 2020
danielkiss created this revision.
danielkiss added reviewers: tamas.petz, chill.
Herald added subscribers: llvm-commits, cfe-commits, hiraditya, kristof.beyls.
Herald added projects: clang, LLVM.
Generate .note.gnu.property for PAC and BTI if the compile unit is
compiled with -mbranch-protection.
It is valid use case to have a non-bti protected function therefore the note shouldn't be
removed in that case. In this case only the direct call is valid to the function.
This behaviour matches with gcc.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80791
Files:
clang/lib/CodeGen/CodeGenModule.cpp
llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-0.ll
llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-1.ll
llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-2.ll
llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-3.ll
llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-4.ll
llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-5.ll
llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-6.ll
llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-7.ll
llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-8.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80791.267201.patch
Type: text/x-patch
Size: 9905 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200529/95921f70/attachment-0001.bin>
More information about the cfe-commits
mailing list