[libcxx-commits] [PATCH] D77786: [AArch64] Add v8.5 Branch Target Identification support.
Daniel Kiss via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 14 15:12:39 PDT 2020
danielkiss updated this revision to Diff 257511.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77786/new/
https://reviews.llvm.org/D77786
Files:
libunwind/src/assembly.h
Index: libunwind/src/assembly.h
===================================================================
--- libunwind/src/assembly.h
+++ libunwind/src/assembly.h
@@ -35,17 +35,34 @@
#endif
#if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1)
-#define PPC64_OPD1 .section .opd,"aw", at progbits SEPARATOR
-#define PPC64_OPD2 SEPARATOR \
+#define ARCH_OPD1 .section .opd,"aw", at progbits SEPARATOR
+#define ARCH_OPD2 SEPARATOR \
.p2align 3 SEPARATOR \
.quad .Lfunc_begin0 SEPARATOR \
.quad .TOC. at tocbase SEPARATOR \
.quad 0 SEPARATOR \
.text SEPARATOR \
.Lfunc_begin0:
+#elif defined(__aarch64__) && defined(__ARM_FEATURE_BTI_DEFAULT)
+ .pushsection ".note.gnu.property", "a" SEPARATOR \
+ .balign 8 SEPARATOR \
+ .long 4 SEPARATOR \
+ .long 0x10 SEPARATOR \
+ .long 0x5 SEPARATOR \
+ .asciz "GNU" SEPARATOR \
+ /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */ \
+ .long 0xc0000000 SEPARATOR \
+ .long 4 SEPARATOR \
+ /* GNU_PROPERTY_AARCH64_FEATURE_1_BTI */\
+ /* GNU_PROPERTY_AARCH64_FEATURE_1_PAC */\
+ .long 3 SEPARATOR \
+ .long 0 SEPARATOR \
+ .popsection SEPARATOR
+#define ARCH_OPD1
+#define ARCH_OPD2 hint #34 /* bti c */
#else
-#define PPC64_OPD1
-#define PPC64_OPD2
+#define ARCH_OPD1
+#define ARCH_OPD2
#endif
#define GLUE2(a, b) a ## b
@@ -142,9 +159,9 @@
.globl SYMBOL_NAME(name) SEPARATOR \
HIDDEN_SYMBOL(SYMBOL_NAME(name)) SEPARATOR \
SYMBOL_IS_FUNC(SYMBOL_NAME(name)) SEPARATOR \
- PPC64_OPD1 \
+ ARCH_OPD1 \
SYMBOL_NAME(name): \
- PPC64_OPD2
+ ARCH_OPD2
#if defined(__arm__)
#if !defined(__ARM_ARCH)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77786.257511.patch
Type: text/x-patch
Size: 1876 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200414/30afeea8/attachment.bin>
More information about the libcxx-commits
mailing list