1 /*===------ cet.h -Control-flow Enforcement Technology feature ------------===
2 * Add x86 feature with IBT and/or SHSTK bits to ELF program property if they
3 * are enabled. Otherwise, contents in this header file are unused. This file
4 * is mainly design for assembly source code which want to enable CET.
6 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
7 * See https://llvm.org/LICENSE.txt for license information.
8 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
10 *===-----------------------------------------------------------------------===
25 # define _CET_ENDBR endbr64
31 # define _CET_ENDBR endbr32
39 # define __PROPERTY_ALIGN 3
41 # define __PROPERTY_ALIGN 2
44 .pushsection
".note.gnu.property", "a"
45 .p2align __PROPERTY_ALIGN
46 .long 1f
- 0f
/* name length. */
47 .long 4f
- 1f
/* data length. */
48 /* NT_GNU_PROPERTY_TYPE_0. */
49 .long 5 /* note type. */
51 .asciz
"GNU" /* vendor name. */
53 .p2align __PROPERTY_ALIGN
54 /* GNU_PROPERTY_X86_FEATURE_1_AND. */
55 .long 0xc0000002 /* pr_type. */
56 .long 3f
- 2f
/* pr_datasz. */
58 /* GNU_PROPERTY_X86_FEATURE_1_XXX. */
61 .p2align __PROPERTY_ALIGN