Re: [PATCH v26 26/30] ELF: Introduce arch_setup_elf_property()

From: Yu, Yu-cheng
Date: Thu May 20 2021 - 13:52:20 EST


On 5/20/2021 10:38 AM, Matthew Wilcox wrote:
On Wed, May 19, 2021 at 03:14:58PM -0700, Yu, Yu-cheng wrote:
+++ b/include/uapi/linux/elf.h
@@ -455,4 +455,13 @@ typedef struct elf64_note {
/* Bits for GNU_PROPERTY_AARCH64_FEATURE_1_BTI */
#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI (1U << 0)
+/* .note.gnu.property types for x86: */
+#define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002

Why not 0xc0000001? ARM64 is 0xc0000000...


I just looked at the ABI document.

ARM has GNU_PROPERTY_AARCH64_FEATURE_1_AND 0xc0000000

X86 has:
GNU_PROPERTY_X86_ISA_1_USED 0xc0000000
GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001
GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002

Please add all three, not just the last one.


Ok!