gdb: support rseq auxvs
[binutils-gdb.git] / include / elf / common.h
index a1cace406a473582ab106e6f441f06726fa97038..244b13361e5e135058e582df06d339fb3b69ab82 100644 (file)
@@ -1,5 +1,5 @@
 /* ELF support for BFD.
-   Copyright (C) 1991-2022 Free Software Foundation, Inc.
+   Copyright (C) 1991-2023 Free Software Foundation, Inc.
 
    Written by Fred Fish @ Cygnus Support, from information published
    in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -79,7 +79,9 @@
 #define ELFOSABI_C6000_ELFABI 64 /* Bare-metal TMS320C6000 */
 #define ELFOSABI_AMDGPU_HSA  64 /* AMD HSA Runtime */
 #define ELFOSABI_C6000_LINUX 65 /* Linux TMS320C6000 */
+#define ELFOSABI_AMDGPU_PAL  65 /* AMD PAL Runtime */
 #define ELFOSABI_ARM_FDPIC   65 /* ARM FDPIC */
+#define ELFOSABI_AMDGPU_MESA3D 66 /* AMD Mesa3D Runtime */
 #define ELFOSABI_ARM        97 /* ARM */
 #define ELFOSABI_STANDALONE 255        /* Standalone (embedded) application */
 
 #define PT_GNU_STACK   (PT_LOOS + 0x474e551) /* Stack flags */
 #define PT_GNU_RELRO   (PT_LOOS + 0x474e552) /* Read-only after relocation */
 #define PT_GNU_PROPERTY        (PT_LOOS + 0x474e553) /* GNU property */
+#define PT_GNU_SFRAME  (PT_LOOS + 0x474e554) /* SFrame stack trace information */
 
 /* OpenBSD segment types.  */
+#define PT_OPENBSD_MUTABLE   (PT_LOOS + 0x5a3dbe5)  /* Like bss, but not immutable.  */
 #define PT_OPENBSD_RANDOMIZE (PT_LOOS + 0x5a3dbe6)  /* Fill with random data.  */
 #define PT_OPENBSD_WXNEEDED  (PT_LOOS + 0x5a3dbe7)  /* Program does W^X violations.  */
+#define PT_OPENBSD_NOBTCFI   (PT_LOOS + 0x5a3dbe8)  /* No branch target CFI.  */
 #define PT_OPENBSD_BOOTDATA  (PT_LOOS + 0x5a41be6)  /* Section for boot arguments.  */
 
 /* Mbind segments */
 
 /* Compression types.  */
 #define ELFCOMPRESS_ZLIB   1           /* Compressed with zlib.  */
+#define ELFCOMPRESS_ZSTD   2           /* Compressed with zstd  */
+                                       /* (see http://www.zstandard.org). */
 #define ELFCOMPRESS_LOOS   0x60000000  /* OS-specific semantics, lo */
 #define ELFCOMPRESS_HIOS   0x6FFFFFFF  /* OS-specific semantics, hi */
 #define ELFCOMPRESS_LOPROC 0x70000000  /* Processor-specific semantics, lo */
                                        /*   note name must be "LINUX".  */
 #define NT_ARM_HW_WATCH        0x403           /* AArch hardware watchpoint registers */
                                        /*   note name must be "LINUX".  */
+#define NT_ARM_SYSTEM_CALL      0x404   /* AArch ARM system call number */
+                                       /*   note name must be "LINUX".  */
 #define NT_ARM_SVE     0x405           /* AArch SVE registers.  */
                                        /*   note name must be "LINUX".  */
 #define NT_ARM_PAC_MASK        0x406           /* AArch pointer authentication code masks */
 #define NT_ARM_PAC_ENABLED_KEYS        0x40a   /* AArch64 pointer authentication
                                           enabled keys (prctl()) */
                                        /*   note name must be "LINUX".  */
+#define NT_ARM_SSVE     0x40b          /* AArch64 SME streaming SVE registers.  */
+                                       /*   Note: name must be "LINUX".  */
+#define NT_ARM_ZA       0x40c           /* AArch64 SME ZA register.  */
+                                       /*   Note: name must be "LINUX".  */
+#define NT_ARM_ZT       0x40d           /* AArch64 SME2 ZT registers.  */
+                                       /*   Note: name must be "LINUX".  */
 #define NT_ARC_V2      0x600           /* ARC HS accumulator/extra registers.  */
                                        /*   note name must be "LINUX".  */
 #define NT_LARCH_CPUCFG 0xa00          /* LoongArch CPU config registers */
 #define        NT_FREEBSD_PROCSTAT_PSSTRINGS   15      /* Procstat ps_strings data. */
 #define        NT_FREEBSD_PROCSTAT_AUXV        16      /* Procstat auxv data. */
 #define        NT_FREEBSD_PTLWPINFO    17      /* Thread ptrace miscellaneous info. */
+#define        NT_FREEBSD_X86_SEGBASES 0x200   /* x86 segment base registers */
 
 /* Note segments for core files on NetBSD systems.  Note name
    must start with "NetBSD-CORE".  */
 #define NT_OPENBSD_XFPREGS     22
 #define NT_OPENBSD_WCOOKIE     23
 
+/* Note segments for core files on QNX systems.  Note name
+   must start with "QNX".  */
+#define QNT_DEBUG_FULLPATH 1
+#define QNT_DEBUG_RELOC    2
+#define QNT_STACK          3
+#define QNT_GENERATOR      4
+#define QNT_DEFAULT_LIB    5
+#define QNT_CORE_SYSINFO   6
+#define QNT_CORE_INFO      7
+#define QNT_CORE_STATUS    8
+#define QNT_CORE_GREG      9
+#define QNT_CORE_FPREG     10
+#define QNT_LINK_MAP       11
 
 /* Note segments for core files on Solaris systems.  Note name
    must start with "CORE".  */
 #define DT_FINI_ARRAYSZ 28
 #define DT_RUNPATH     29
 #define DT_FLAGS       30
+
+/* Values in the range [DT_ENCODING, DT_LOOS) use d_un.d_ptr if the
+   value is even, d_un.d_val if odd.  */
+#define DT_ENCODING    32
 #define DT_PREINIT_ARRAY   32
 #define DT_PREINIT_ARRAYSZ 33
 #define DT_SYMTAB_SHNDX    34
 #define DT_RELRSZ      35
 #define DT_RELR                36
 #define DT_RELRENT     37
-#define DT_ENCODING    38
 
 /* Note, the Oct 4, 1999 draft of the ELF ABI changed the values
    for DT_LOOS and DT_HIOS.  Some implementations however, use
                                           may differ from AT_PLATFORM.  */
 #define AT_RANDOM      25              /* Address of 16 random bytes.  */
 #define AT_HWCAP2      26              /* Extension of AT_HWCAP.  */
+#define AT_RSEQ_FEATURE_SIZE   27      /* rseq supported feature size */
+#define AT_RSEQ_ALIGN  28              /* rseq allocation alignment */
 #define AT_EXECFN      31              /* Filename of executable.  */
 /* Pointer to the global system page used for system calls and other
    nice things.  */
 #define AT_FREEBSD_PS_STRINGS   32      /* struct ps_strings. */
 #define AT_FREEBSD_FXRNG        33      /* Pointer to root RNG seed version. */
 #define AT_FREEBSD_KPRELOAD     34      /* Base of vdso. */
+#define AT_FREEBSD_USRSTACKBASE 35      /* Top of user stack. */
+#define AT_FREEBSD_USRSTACKLIM  36      /* Grow limit of user stack. */
 
 #define AT_SUN_UID      2000    /* Effective user ID.  */
 #define AT_SUN_RUID     2001    /* Real user ID.  */