blob: 63f42c71b628473ac00e908c29e99cada967ccd0 [file] [log] [blame]
Gabor Toth748b3db2024-06-06 13:50:19 +02001/* SPDX-License-Identifier: BSD-2-Clause */
2/*
3 * Copyright (c) 2021, Linaro Limited
4 */
5
6#include <elf_common.h>
7
8/*
9 * This macro emits a program property note section identifying
10 * architecture features which require special handling, mainly for
11 * use in assembly files in the libraries linked with TA's.
12 */
13
14.macro emit_aarch64_feature_1_and, feat
15 .pushsection .note.gnu.property, "a"
16 .align 3
17 .long 2f - 1f /* n_namesz */
18 .long 6f - 3f /* n_desc_sz */
19 .long NT_GNU_PROPERTY_TYPE_0 /* n_type */
201: .string "GNU" /* name */
212:
22 .align 3
233: .long GNU_PROPERTY_AARCH64_FEATURE_1_AND /* pr_type */
24 .long 5f - 4f /* pr_datasz */
254:
26 /*
27 * This is described with an array of char in the Linux API
28 * spec but the text and all other usage (including binutils,
29 * clang and GCC) treat this as a 32 bit value so no swizzling
30 * is required for big endian.
31 */
32 .long \feat /* property */
335:
34 .align 3
356:
36 .popsection
37.endm