* [COMMITTED] libelf: Sync elf.h from glibc
@ 2022-10-28 22:31 Mark Wielaard
0 siblings, 0 replies; 5+ messages in thread
From: Mark Wielaard @ 2022-10-28 22:31 UTC (permalink / raw)
To: elfutils-devel; +Cc: Mark Wielaard
Adds ELFCOMPRESS_ZSTD, NT_S390_PV_CPU_DATA and NT_LOONGARCH_*.
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
libelf/ChangeLog | 4 ++++
libelf/elf.h | 18 +++++++++++++-----
2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index aefb31b3..8107c71e 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,7 @@
+2022-10-28 Mark Wielaard <mark@klomp.org>
+
+ * elf.h: Update from glibc.
+
2022-10-21 Yonggang Luo <luoyonggang@gmail.com>
* libelf_crc32.c: Remove LIB_SYSTEM_H define.
diff --git a/libelf/elf.h b/libelf/elf.h
index 02a1b3f5..f51300bc 100644
--- a/libelf/elf.h
+++ b/libelf/elf.h
@@ -506,6 +506,7 @@ typedef struct
/* Legal values for ch_type (compression algorithm). */
#define ELFCOMPRESS_ZLIB 1 /* ZLIB/DEFLATE algorithm. */
+#define ELFCOMPRESS_ZSTD 2 /* Zstandard algorithm. */
#define ELFCOMPRESS_LOOS 0x60000000 /* Start of OS-specific. */
#define ELFCOMPRESS_HIOS 0x6fffffff /* End of OS-specific. */
#define ELFCOMPRESS_LOPROC 0x70000000 /* Start of processor-specific. */
@@ -808,6 +809,7 @@ typedef struct
#define NT_S390_GS_BC 0x30c /* s390 guarded storage
broadcast control block. */
#define NT_S390_RI_CB 0x30d /* s390 runtime instrumentation. */
+#define NT_S390_PV_CPU_DATA 0x30e /* s390 protvirt cpu dump data. */
#define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */
#define NT_ARM_TLS 0x401 /* ARM TLS register */
#define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */
@@ -829,6 +831,15 @@ typedef struct
#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */
#define NT_MIPS_MSA 0x802 /* MIPS SIMD registers. */
+#define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers. */
+#define NT_LOONGARCH_CSR 0xa01 /* LoongArch control and
+ status registers. */
+#define NT_LOONGARCH_LSX 0xa02 /* LoongArch Loongson SIMD
+ Extension registers. */
+#define NT_LOONGARCH_LASX 0xa03 /* LoongArch Loongson Advanced
+ SIMD Extension registers. */
+#define NT_LOONGARCH_LBT 0xa04 /* LoongArch Loongson Binary
+ Translation registers. */
/* Legal values for the note segment descriptor types for object files. */
@@ -1054,7 +1065,8 @@ typedef struct
/* Legal values for vd_flags (version information flags). */
#define VER_FLG_BASE 0x1 /* Version definition of file itself */
-#define VER_FLG_WEAK 0x2 /* Weak version identifier */
+#define VER_FLG_WEAK 0x2 /* Weak version identifier. Also
+ used by vna_flags below. */
/* Versym symbol index values. */
#define VER_NDX_LOCAL 0 /* Symbol is local. */
@@ -1132,10 +1144,6 @@ typedef struct
} Elf64_Vernaux;
-/* Legal values for vna_flags. */
-#define VER_FLG_WEAK 0x2 /* Weak version identifier */
-
-
/* Auxiliary vector. */
/* This vector is normally only used by the program interpreter. The
--
2.30.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [COMMITTED] libelf: Sync elf.h from glibc
@ 2024-08-16 22:55 Mark Wielaard
0 siblings, 0 replies; 5+ messages in thread
From: Mark Wielaard @ 2024-08-16 22:55 UTC (permalink / raw)
To: elfutils-devel; +Cc: Mark Wielaard
* libelf/elf.h: Adds NT_ARM_{SSVE,ZA,ZT,FPRM}
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
libelf/elf.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libelf/elf.h b/libelf/elf.h
index 081742a9c38c..33aea7f743b8 100644
--- a/libelf/elf.h
+++ b/libelf/elf.h
@@ -831,6 +831,10 @@ typedef struct
control. */
#define NT_ARM_PAC_ENABLED_KEYS 0x40a /* AArch64 pointer authentication
enabled keys. */
+#define NT_ARM_SSVE 0x40b /* ARM Streaming SVE registers. */
+#define NT_ARM_ZA 0x40c /* ARM SME ZA registers. */
+#define NT_ARM_ZT 0x40d /* ARM SME ZT registers. */
+#define NT_ARM_FPMR 0x40e /* ARM floating point mode register. */
#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */
#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */
--
2.46.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [COMMITTED] libelf: Sync elf.h from glibc.
@ 2020-06-04 15:00 Mark Wielaard
0 siblings, 0 replies; 5+ messages in thread
From: Mark Wielaard @ 2020-06-04 15:00 UTC (permalink / raw)
To: elfutils-devel; +Cc: Mark Wielaard
There is now finally a PT_GNU_PROPERTY define.
Also EM_ARC_COMPACT2 got renamed to EM_ARCV2.
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
libdwelf/ChangeLog | 5 ++
libdwelf/dwelf_elf_e_machine_string.c | 4 +-
libebl/ChangeLog | 5 ++
libebl/eblsegmenttypename.c | 4 -
libelf/ChangeLog | 4 +
libelf/elf.h | 106 ++++++++++++++++++++++++--
src/ChangeLog | 4 +
src/elflint.c | 4 -
8 files changed, 121 insertions(+), 15 deletions(-)
diff --git a/libdwelf/ChangeLog b/libdwelf/ChangeLog
index 5b48ed8f..008bdeb1 100644
--- a/libdwelf/ChangeLog
+++ b/libdwelf/ChangeLog
@@ -1,3 +1,8 @@
+2020-06-04 Mark Wielaard <mark@klomp.org>
+
+ * dwelf_elf_e_machine_string.c (dwelf_elf_e_machine_string):
+ Rename EM_ARC_COMPACT2 to EM_ARCV2.
+
2019-08-12 Mark Wielaard <mark@klomp.org>
* libdwelf.h (dwelf_elf_begin): Update documentation.
diff --git a/libdwelf/dwelf_elf_e_machine_string.c b/libdwelf/dwelf_elf_e_machine_string.c
index de07b01e..86fa7523 100644
--- a/libdwelf/dwelf_elf_e_machine_string.c
+++ b/libdwelf/dwelf_elf_e_machine_string.c
@@ -340,8 +340,8 @@ dwelf_elf_e_machine_string (int machine)
return "KIPO-KAIST Core-A 1st gen";
case EM_COREA_2ND:
return "KIPO-KAIST Core-A 2nd gen";
- case EM_ARC_COMPACT2:
- return "Synopsys ARCompact V2";
+ case EM_ARCV2:
+ return "Synopsys ARCv2 ISA";
case EM_OPEN8:
return "Open8 RISC";
case EM_RL78:
diff --git a/libebl/ChangeLog b/libebl/ChangeLog
index 90cf9728..75aa1ab8 100644
--- a/libebl/ChangeLog
+++ b/libebl/ChangeLog
@@ -1,3 +1,8 @@
+2020-06-04 Mark Wielaard <mark@klomp.org>
+
+ * eblsegmenttypename.c (ebl_segment_type_name): Remove
+ PT_GNU_PROPERTY define.
+
2020-04-17 Mark Wielaard <mark@klomp.org>
* eblopenbackend.c (default_debugscn_p): Handle .gnu.debuglto_
diff --git a/libebl/eblsegmenttypename.c b/libebl/eblsegmenttypename.c
index c6bdff8a..23a85482 100644
--- a/libebl/eblsegmenttypename.c
+++ b/libebl/eblsegmenttypename.c
@@ -56,10 +56,6 @@ ebl_segment_type_name (Ebl *ebl, int segment, char *buf, size_t len)
PTYPE (TLS)
};
-#ifndef PT_GNU_PROPERTY
-#define PT_GNU_PROPERTY (PT_LOOS + 0x474e553)
-#endif
-
/* Is it one of the standard segment types? */
if (segment >= PT_NULL && segment < PT_NUM)
res = ptypes[segment];
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index fd5518dc..8f6d2d2d 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,7 @@
+2020-06-04 Mark Wielaard <mark@klomp.org>
+
+ * elf.h: Update from glibc.
+
2020-05-08 Mark Wielaard <mark@klomp.org>
* elf_strptr.c (elf_strptr): Check shdr is not NULL.
diff --git a/libelf/elf.h b/libelf/elf.h
index 01648bdb..197b557d 100644
--- a/libelf/elf.h
+++ b/libelf/elf.h
@@ -1,5 +1,5 @@
/* This file defines standard ELF types, structures, and macros.
- Copyright (C) 1995-2019 Free Software Foundation, Inc.
+ Copyright (C) 1995-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -14,7 +14,7 @@
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#ifndef _ELF_H
#define _ELF_H 1
@@ -330,7 +330,7 @@ typedef struct
#define EM_CLOUDSHIELD 192 /* CloudShield */
#define EM_COREA_1ST 193 /* KIPO-KAIST Core-A 1st gen. */
#define EM_COREA_2ND 194 /* KIPO-KAIST Core-A 2nd gen. */
-#define EM_ARC_COMPACT2 195 /* Synopsys ARCompact V2 */
+#define EM_ARCV2 195 /* Synopsys ARCv2 ISA. */
#define EM_OPEN8 196 /* Open8 RISC */
#define EM_RL78 197 /* Renesas RL78 */
#define EM_VIDEOCORE5 198 /* Broadcom VideoCore V */
@@ -721,6 +721,7 @@ typedef struct
#define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */
#define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
#define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
+#define PT_GNU_PROPERTY 0x6474e553 /* GNU property */
#define PT_LOSUNW 0x6ffffffa
#define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
#define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
@@ -809,9 +810,16 @@ typedef struct
#define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */
#define NT_ARM_SVE 0x405 /* ARM Scalable Vector Extension
registers */
+#define NT_ARM_PAC_MASK 0x406 /* ARM pointer authentication
+ code masks. */
+#define NT_ARM_PACA_KEYS 0x407 /* ARM pointer authentication
+ address keys. */
+#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication
+ generic key. */
#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */
#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */
+#define NT_MIPS_MSA 0x802 /* MIPS SIMD registers. */
/* Legal values for the note segment descriptor types for object files. */
@@ -987,6 +995,9 @@ typedef struct
#define DF_1_SINGLETON 0x02000000 /* Singleton symbols are used. */
#define DF_1_STUB 0x04000000
#define DF_1_PIE 0x08000000
+#define DF_1_KMOD 0x10000000
+#define DF_1_WEAKFILTER 0x20000000
+#define DF_1_NOCOMMON 0x40000000
/* Flags for the feature selection in DT_FEATURE_1. */
#define DTF_1_PARINIT 0x00000001
@@ -1308,6 +1319,12 @@ typedef struct
/* Application-specific semantics, hi */
#define GNU_PROPERTY_HIUSER 0xffffffff
+/* AArch64 specific GNU properties. */
+#define GNU_PROPERTY_AARCH64_FEATURE_1_AND 0xc0000000
+
+#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI (1U << 0)
+#define GNU_PROPERTY_AARCH64_FEATURE_1_PAC (1U << 1)
+
/* The x86 instruction sets indicated by the corresponding bits are
used in program. Their support in the hardware is optional. */
#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000
@@ -1705,6 +1722,7 @@ typedef struct
#define SHT_MIPS_EH_REGION 0x70000027
#define SHT_MIPS_XLATE_OLD 0x70000028
#define SHT_MIPS_PDR_EXCEPTION 0x70000029
+#define SHT_MIPS_XHASH 0x7000002b
/* Legal values for sh_flags field of Elf32_Shdr. */
@@ -1952,7 +1970,9 @@ typedef struct
in a PIE as it stores a relative offset from the address of the tag
rather than an absolute address. */
#define DT_MIPS_RLD_MAP_REL 0x70000035
-#define DT_MIPS_NUM 0x36
+/* GNU-style hash table with xlat. */
+#define DT_MIPS_XHASH 0x70000036
+#define DT_MIPS_NUM 0x37
/* Legal values for DT_MIPS_FLAGS Elf32_Dyn entry. */
@@ -2854,6 +2874,13 @@ enum
#define R_AARCH64_TLSDESC 1031 /* TLS Descriptor. */
#define R_AARCH64_IRELATIVE 1032 /* STT_GNU_IFUNC relocation. */
+/* AArch64 specific values for the Dyn d_tag field. */
+#define DT_AARCH64_VARIANT_PCS (DT_LOPROC + 5)
+#define DT_AARCH64_NUM 6
+
+/* AArch64 specific values for the st_other field. */
+#define STO_AARCH64_VARIANT_PCS 0x80
+
/* ARM relocs. */
#define R_ARM_NONE 0 /* No reloc */
@@ -3926,8 +3953,9 @@ enum
#define R_RISCV_SET16 55
#define R_RISCV_SET32 56
#define R_RISCV_32_PCREL 57
+#define R_RISCV_IRELATIVE 58
-#define R_RISCV_NUM 58
+#define R_RISCV_NUM 59
/* BPF specific declarations. */
@@ -4007,6 +4035,74 @@ enum
#define R_NDS32_TLS_TPOFF 102
#define R_NDS32_TLS_DESC 119
+/* ARCompact/ARCv2 specific relocs. */
+#define R_ARC_NONE 0x0
+#define R_ARC_8 0x1
+#define R_ARC_16 0x2
+#define R_ARC_24 0x3
+#define R_ARC_32 0x4
+#define R_ARC_B26 0x5
+#define R_ARC_B22_PCREL 0x6
+#define R_ARC_H30 0x7
+#define R_ARC_N8 0x8
+#define R_ARC_N16 0x9
+#define R_ARC_N24 0xA
+#define R_ARC_N32 0xB
+#define R_ARC_SDA 0xC
+#define R_ARC_SECTOFF 0xD
+#define R_ARC_S21H_PCREL 0xE
+#define R_ARC_S21W_PCREL 0xF
+#define R_ARC_S25H_PCREL 0x10
+#define R_ARC_S25W_PCREL 0x11
+#define R_ARC_SDA32 0x12
+#define R_ARC_SDA_LDST 0x13
+#define R_ARC_SDA_LDST1 0x14
+#define R_ARC_SDA_LDST2 0x15
+#define R_ARC_SDA16_LD 0x16
+#define R_ARC_SDA16_LD1 0x17
+#define R_ARC_SDA16_LD2 0x18
+#define R_ARC_S13_PCREL 0x19
+#define R_ARC_W 0x1A
+#define R_ARC_32_ME 0x1B
+#define R_ARC_N32_ME 0x1C
+#define R_ARC_SECTOFF_ME 0x1D
+#define R_ARC_SDA32_ME 0x1E
+#define R_ARC_W_ME 0x1F
+#define R_ARC_H30_ME 0x20
+#define R_ARC_SECTOFF_U8 0x21
+#define R_ARC_SECTOFF_S9 0x22
+#define R_AC_SECTOFF_U8 0x23
+#define R_AC_SECTOFF_U8_1 0x24
+#define R_AC_SECTOFF_U8_2 0x25
+#define R_AC_SECTOFF_S9 0x26
+#define R_AC_SECTOFF_S9_1 0x27
+#define R_AC_SECTOFF_S9_2 0x28
+#define R_ARC_SECTOFF_ME_1 0x29
+#define R_ARC_SECTOFF_ME_2 0x2A
+#define R_ARC_SECTOFF_1 0x2B
+#define R_ARC_SECTOFF_2 0x2C
+#define R_ARC_PC32 0x32
+#define R_ARC_GOTPC32 0x33
+#define R_ARC_PLT32 0x34
+#define R_ARC_COPY 0x35
+#define R_ARC_GLOB_DAT 0x36
+#define R_ARC_JUMP_SLOT 0x37
+#define R_ARC_RELATIVE 0x38
+#define R_ARC_GOTOFF 0x39
+#define R_ARC_GOTPC 0x3A
+#define R_ARC_GOT32 0x3B
+
+#define R_ARC_TLS_DTPMOD 0x42
+#define R_ARC_TLS_DTPOFF 0x43
+#define R_ARC_TLS_TPOFF 0x44
+#define R_ARC_TLS_GD_GOT 0x45
+#define R_ARC_TLS_GD_LD 0x46
+#define R_ARC_TLS_GD_CALL 0x47
+#define R_ARC_TLS_IE_GOT 0x48
+#define R_ARC_TLS_DTPOFF_S9 0x4a
+#define R_ARC_TLS_LE_S9 0x4a
+#define R_ARC_TLS_LE_32 0x4b
+
__END_DECLS
#endif /* elf.h */
diff --git a/src/ChangeLog b/src/ChangeLog
index 83fe19eb..c8e6b4e8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2020-06-04 Mark Wielaard <mark@klomp.org>
+
+ * elflint.c (check_program_header): Remove PT_GNU_PROPERTY define.
+
2020-05-14 Mark Wielaard <mark@klomp.org>
* size.c (show_bsd): Set printf format based on radix.
diff --git a/src/elflint.c b/src/elflint.c
index 6ad9bc42..72584de0 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -4492,10 +4492,6 @@ only executables, shared objects, and core files can have program headers\n"));
continue;
}
-#ifndef PT_GNU_PROPERTY
-#define PT_GNU_PROPERTY (PT_LOOS + 0x474e553)
-#endif
-
if (phdr->p_type >= PT_NUM && phdr->p_type != PT_GNU_EH_FRAME
&& phdr->p_type != PT_GNU_STACK && phdr->p_type != PT_GNU_RELRO
&& phdr->p_type != PT_GNU_PROPERTY
--
2.18.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [COMMITTED] libelf: Sync elf.h from glibc.
@ 2018-06-21 18:46 Mark Wielaard
0 siblings, 0 replies; 5+ messages in thread
From: Mark Wielaard @ 2018-06-21 18:46 UTC (permalink / raw)
To: elfutils-devel; +Cc: Mark Wielaard
Add NT_PPC_PKEY, R_BPF_64_64 and R_BPF_64_32. Remove R_BPF_MAP_FD.
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
backends/ChangeLog | 4 ++++
backends/bpf_reloc.def | 1 -
libelf/ChangeLog | 4 ++++
libelf/elf.h | 5 ++++-
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/backends/ChangeLog b/backends/ChangeLog
index b34918fa..e97e33d6 100644
--- a/backends/ChangeLog
+++ b/backends/ChangeLog
@@ -1,3 +1,7 @@
+2018-06-21 Mark Wielaard <mark@klomp.org>
+
+ * bpf_reloc.def: Remove MAP_FD.
+
2018-06-13 Andreas Schwab <schwab@suse.de>
* Makefile.am (riscv_SRCS): Add riscv_cfi.c and riscv_regs.c.
diff --git a/backends/bpf_reloc.def b/backends/bpf_reloc.def
index a410da97..09ac3a6c 100644
--- a/backends/bpf_reloc.def
+++ b/backends/bpf_reloc.def
@@ -28,4 +28,3 @@
/* NAME, REL|EXEC|DYN */
RELOC_TYPE (NONE, EXEC|DYN)
-RELOC_TYPE (MAP_FD, REL|EXEC|DYN)
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index ea2b9df8..ec97caaf 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,7 @@
+2018-06-21 Mark Wielaard <mark@klomp.org>
+
+ * elf.h: Update from glibc.
+
2018-04-19 Andreas Schwab <schwab@suse.de>
* elf.h: Update from glibc.
diff --git a/libelf/elf.h b/libelf/elf.h
index f7748983..75043bcb 100644
--- a/libelf/elf.h
+++ b/libelf/elf.h
@@ -780,6 +780,8 @@ typedef struct
Register */
#define NT_PPC_TM_CDSCR 0x10f /* TM checkpointed Data Stream Control
Register */
+#define NT_PPC_PKEY 0x110 /* Memory Protection Keys
+ registers. */
#define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */
#define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */
#define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */
@@ -3848,7 +3850,8 @@ enum
/* BPF specific declarations. */
#define R_BPF_NONE 0 /* No reloc */
-#define R_BPF_MAP_FD 1 /* Map fd to pointer */
+#define R_BPF_64_64 1
+#define R_BPF_64_32 10
/* Imagination Meta specific relocations. */
--
2.17.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [COMMITTED] libelf: Sync elf.h from glibc.
@ 2018-02-18 17:04 Mark Wielaard
0 siblings, 0 replies; 5+ messages in thread
From: Mark Wielaard @ 2018-02-18 17:04 UTC (permalink / raw)
To: elfutils-devel; +Cc: Mark Wielaard
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
libelf/ChangeLog | 4 +++
libelf/elf.h | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 98 insertions(+), 2 deletions(-)
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index 55ab25c..62e8911 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,7 @@
+2018-02-16 Mark Wielaard <mark@klomp.org>
+
+ * elf.h: Update from glibc.
+
2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
* elf32_updatenull.c (updatenull_wrlock): Use FALLTHROUGH macro
diff --git a/libelf/elf.h b/libelf/elf.h
index 84a7126..4f43577 100644
--- a/libelf/elf.h
+++ b/libelf/elf.h
@@ -1,5 +1,5 @@
/* This file defines standard ELF types, structures, and macros.
- Copyright (C) 1995-2017 Free Software Foundation, Inc.
+ Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -739,6 +739,8 @@ typedef struct
/* Legal values for note segment descriptor types for core files. */
#define NT_PRSTATUS 1 /* Contains copy of prstatus struct */
+#define NT_PRFPREG 2 /* Contains copy of fpregset
+ struct. */
#define NT_FPREGSET 2 /* Contains copy of fpregset struct */
#define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */
#define NT_PRXREG 4 /* Contains copy of prxregset struct */
@@ -790,11 +792,20 @@ typedef struct
#define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */
#define NT_S390_SYSTEM_CALL 0x307 /* s390 system call restart data */
#define NT_S390_TDB 0x308 /* s390 transaction diagnostic block */
+#define NT_S390_VXRS_LOW 0x309 /* s390 vector registers 0-15
+ upper half. */
+#define NT_S390_VXRS_HIGH 0x30a /* s390 vector registers 16-31. */
+#define NT_S390_GS_CB 0x30b /* s390 guarded storage registers. */
+#define NT_S390_GS_BC 0x30c /* s390 guarded storage
+ broadcast control block. */
+#define NT_S390_RI_CB 0x30d /* s390 runtime instrumentation. */
#define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */
#define NT_ARM_TLS 0x401 /* ARM TLS register */
#define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */
#define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */
#define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */
+#define NT_ARM_SVE 0x405 /* ARM Scalable Vector Extension
+ registers */
/* Legal values for the note segment descriptor types for object files. */
@@ -859,7 +870,8 @@ typedef struct
#define DT_ENCODING 32 /* Start of encoded range */
#define DT_PREINIT_ARRAY 32 /* Array with addresses of preinit fct*/
#define DT_PREINIT_ARRAYSZ 33 /* size in bytes of DT_PREINIT_ARRAY */
-#define DT_NUM 34 /* Number used */
+#define DT_SYMTAB_SHNDX 34 /* Address of SYMTAB_SHNDX section */
+#define DT_NUM 35 /* Number used */
#define DT_LOOS 0x6000000d /* Start of OS-specific */
#define DT_HIOS 0x6ffff000 /* End of OS-specific */
#define DT_LOPROC 0x70000000 /* Start of processor-specific */
@@ -967,6 +979,8 @@ typedef struct
#define DF_1_SYMINTPOSE 0x00800000 /* Object has individual interposers. */
#define DF_1_GLOBAUDIT 0x01000000 /* Global auditing required. */
#define DF_1_SINGLETON 0x02000000 /* Singleton symbols are used. */
+#define DF_1_STUB 0x04000000
+#define DF_1_PIE 0x08000000
/* Flags for the feature selection in DT_FEATURE_1. */
#define DTF_1_PARINIT 0x00000001
@@ -1263,6 +1277,62 @@ typedef struct
/* Version note generated by GNU gold containing a version string. */
#define NT_GNU_GOLD_VERSION 4
+/* Program property. */
+#define NT_GNU_PROPERTY_TYPE_0 5
+
+/* Note section name of program property. */
+#define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property"
+
+/* Values used in GNU .note.gnu.property notes (NT_GNU_PROPERTY_TYPE_0). */
+
+/* Stack size. */
+#define GNU_PROPERTY_STACK_SIZE 1
+/* No copy relocation on protected data symbol. */
+#define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2
+
+/* Processor-specific semantics, lo */
+#define GNU_PROPERTY_LOPROC 0xc0000000
+/* Processor-specific semantics, hi */
+#define GNU_PROPERTY_HIPROC 0xdfffffff
+/* Application-specific semantics, lo */
+#define GNU_PROPERTY_LOUSER 0xe0000000
+/* Application-specific semantics, hi */
+#define GNU_PROPERTY_HIUSER 0xffffffff
+
+/* The x86 instruction sets indicated by the corresponding bits are
+ used in program. Their support in the hardware is optional. */
+#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000
+/* The x86 instruction sets indicated by the corresponding bits are
+ used in program and they must be supported by the hardware. */
+#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001
+/* X86 processor-specific features used in program. */
+#define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002
+
+#define GNU_PROPERTY_X86_ISA_1_486 (1U << 0)
+#define GNU_PROPERTY_X86_ISA_1_586 (1U << 1)
+#define GNU_PROPERTY_X86_ISA_1_686 (1U << 2)
+#define GNU_PROPERTY_X86_ISA_1_SSE (1U << 3)
+#define GNU_PROPERTY_X86_ISA_1_SSE2 (1U << 4)
+#define GNU_PROPERTY_X86_ISA_1_SSE3 (1U << 5)
+#define GNU_PROPERTY_X86_ISA_1_SSSE3 (1U << 6)
+#define GNU_PROPERTY_X86_ISA_1_SSE4_1 (1U << 7)
+#define GNU_PROPERTY_X86_ISA_1_SSE4_2 (1U << 8)
+#define GNU_PROPERTY_X86_ISA_1_AVX (1U << 9)
+#define GNU_PROPERTY_X86_ISA_1_AVX2 (1U << 10)
+#define GNU_PROPERTY_X86_ISA_1_AVX512F (1U << 11)
+#define GNU_PROPERTY_X86_ISA_1_AVX512CD (1U << 12)
+#define GNU_PROPERTY_X86_ISA_1_AVX512ER (1U << 13)
+#define GNU_PROPERTY_X86_ISA_1_AVX512PF (1U << 14)
+#define GNU_PROPERTY_X86_ISA_1_AVX512VL (1U << 15)
+#define GNU_PROPERTY_X86_ISA_1_AVX512DQ (1U << 16)
+#define GNU_PROPERTY_X86_ISA_1_AVX512BW (1U << 17)
+
+/* This indicates that all executable sections are compatible with
+ IBT. */
+#define GNU_PROPERTY_X86_FEATURE_1_IBT (1U << 0)
+/* This indicates that all executable sections are compatible with
+ SHSTK. */
+#define GNU_PROPERTY_X86_FEATURE_1_SHSTK (1U << 1)
/* Move records. */
typedef struct
@@ -3706,6 +3776,28 @@ enum
#define R_TILEGX_NUM 130
+/* RISC-V ELF Flags */
+#define EF_RISCV_RVC 0x0001
+#define EF_RISCV_FLOAT_ABI 0x0006
+#define EF_RISCV_FLOAT_ABI_SOFT 0x0000
+#define EF_RISCV_FLOAT_ABI_SINGLE 0x0002
+#define EF_RISCV_FLOAT_ABI_DOUBLE 0x0004
+#define EF_RISCV_FLOAT_ABI_QUAD 0x0006
+
+/* RISC-V relocations. */
+#define R_RISCV_NONE 0
+#define R_RISCV_32 1
+#define R_RISCV_64 2
+#define R_RISCV_RELATIVE 3
+#define R_RISCV_COPY 4
+#define R_RISCV_JUMP_SLOT 5
+#define R_RISCV_TLS_DTPMOD32 6
+#define R_RISCV_TLS_DTPMOD64 7
+#define R_RISCV_TLS_DTPREL32 8
+#define R_RISCV_TLS_DTPREL64 9
+#define R_RISCV_TLS_TPREL32 10
+#define R_RISCV_TLS_TPREL64 11
+
/* BPF specific declarations. */
#define R_BPF_NONE 0 /* No reloc */
--
1.8.3.1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-16 22:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-28 22:31 [COMMITTED] libelf: Sync elf.h from glibc Mark Wielaard
-- strict thread matches above, loose matches on Subject: below --
2024-08-16 22:55 Mark Wielaard
2020-06-04 15:00 Mark Wielaard
2018-06-21 18:46 Mark Wielaard
2018-02-18 17:04 Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).