diff mbox series

Add PT_AARCH64_MEMTAG_MTE from Linux 5.18 to elf.h

Message ID alpine.DEB.2.22.394.2206011930001.3755786@digraph.polyomino.org.uk
State New
Headers show
Series Add PT_AARCH64_MEMTAG_MTE from Linux 5.18 to elf.h | expand

Commit Message

Joseph Myers June 1, 2022, 7:30 p.m. UTC
Linux 5.18 defines a new AArch64 ELF segment type
PT_AARCH64_MEMTAG_MTE; add it to elf.h.

Tested with build-many-glibcs.py for aarch64-linux-gnu.

Comments

Fangrui Song June 2, 2022, 1:21 a.m. UTC | #1
On 2022-06-01, Joseph Myers wrote:
>Linux 5.18 defines a new AArch64 ELF segment type
>PT_AARCH64_MEMTAG_MTE; add it to elf.h.
>
>Tested with build-many-glibcs.py for aarch64-linux-gnu.

Confirmed the value matches:

https://github.com/ARM-software/abi-aa/pull/148/files
https://git.kernel.org/linus/c35fe2a68f29a0bda15ae994154cacaae5f69791

Reviewed-by: Fangrui Song <maskray@google.com>

>diff --git a/elf/elf.h b/elf/elf.h
>index 1c3d5ce8a2..2b5c2c5fb6 100644
>--- a/elf/elf.h
>+++ b/elf/elf.h
>@@ -2902,6 +2902,9 @@ enum
> #define R_AARCH64_TLSDESC      1031	/* TLS Descriptor.  */
> #define R_AARCH64_IRELATIVE	1032	/* STT_GNU_IFUNC relocation.  */
>
>+/* MTE memory tag segment type.  */
>+#define PT_AARCH64_MEMTAG_MTE	(PT_LOPROC + 2)
>+
> /* AArch64 specific values for the Dyn d_tag field.  */
> #define DT_AARCH64_BTI_PLT	(DT_LOPROC + 1)
> #define DT_AARCH64_PAC_PLT	(DT_LOPROC + 3)
>
>-- 
>Joseph S. Myers
>joseph@codesourcery.com
diff mbox series

Patch

diff --git a/elf/elf.h b/elf/elf.h
index 1c3d5ce8a2..2b5c2c5fb6 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -2902,6 +2902,9 @@  enum
 #define R_AARCH64_TLSDESC      1031	/* TLS Descriptor.  */
 #define R_AARCH64_IRELATIVE	1032	/* STT_GNU_IFUNC relocation.  */
 
+/* MTE memory tag segment type.  */
+#define PT_AARCH64_MEMTAG_MTE	(PT_LOPROC + 2)
+
 /* AArch64 specific values for the Dyn d_tag field.  */
 #define DT_AARCH64_BTI_PLT	(DT_LOPROC + 1)
 #define DT_AARCH64_PAC_PLT	(DT_LOPROC + 3)