1d4c55
commit d055481ce39d03652ac60de5078889e15b6917ff
1d4c55
Author: Florian Weimer <fweimer@redhat.com>
1d4c55
Date:   Mon May 16 21:59:24 2022 +0200
1d4c55
1d4c55
    scripts/glibcelf.py: Add *T_RISCV_* constants
1d4c55
    
1d4c55
    SHT_RISCV_ATTRIBUTES, PT_RISCV_ATTRIBUTES, DT_RISCV_VARIANT_CC were
1d4c55
    added in commit 0b6c6750732483b4d59c2fcb45484079cd84157d
1d4c55
    ("Update RISC-V specific ELF definitions").  This caused the
1d4c55
    elf/tst-glibcelf consistency check to fail.
1d4c55
    
1d4c55
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
1d4c55
1d4c55
diff --git a/scripts/glibcelf.py b/scripts/glibcelf.py
1d4c55
index f847b36c55c15b8a..07bef940433b4c99 100644
1d4c55
--- a/scripts/glibcelf.py
1d4c55
+++ b/scripts/glibcelf.py
1d4c55
@@ -385,6 +385,10 @@ class ShtPARISC(enum.Enum):
1d4c55
     SHT_PARISC_UNWIND = 0x70000001
1d4c55
     SHT_PARISC_DOC = 0x70000002
1d4c55
 
1d4c55
+class ShtRISCV(enum.Enum):
1d4c55
+    """Supplemental SHT_* constants for EM_RISCV."""
1d4c55
+    SHT_RISCV_ATTRIBUTES = 0x70000003
1d4c55
+
1d4c55
 class Pf(enum.IntFlag):
1d4c55
     """Program header flags.  Type of Phdr.p_flags values."""
1d4c55
     PF_X = 1
1d4c55
@@ -558,6 +562,10 @@ class PtPARISC(enum.Enum):
1d4c55
     PT_PARISC_ARCHEXT = 0x70000000
1d4c55
     PT_PARISC_UNWIND = 0x70000001
1d4c55
 
1d4c55
+class PtRISCV(enum.Enum):
1d4c55
+    """Supplemental PT_* constants for EM_RISCV."""
1d4c55
+    PT_RISCV_ATTRIBUTES = 0x70000003
1d4c55
+
1d4c55
 class Dt(_OpenIntEnum):
1d4c55
     """ELF dynamic segment tags.  Type of Dyn.d_val."""
1d4c55
     DT_NULL = 0
1d4c55
@@ -710,6 +718,10 @@ class DtPPC64(enum.Enum):
1d4c55
     DT_PPC64_OPDSZ = 0x70000002
1d4c55
     DT_PPC64_OPT = 0x70000003
1d4c55
 
1d4c55
+class DtRISCV(enum.Enum):
1d4c55
+    """Supplemental DT_* constants for EM_RISCV."""
1d4c55
+    DT_RISCV_VARIANT_CC = 0x70000001
1d4c55
+
1d4c55
 class DtSPARC(enum.Enum):
1d4c55
     """Supplemental DT_* constants for EM_SPARC."""
1d4c55
     DT_SPARC_REGISTER = 0x70000001