aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2024-05-28 10:12:28 +0100
committerNick Clifton <nickc@redhat.com>2024-05-28 10:12:28 +0100
commit08b0f198b16af719c329581e0ddc290c4c9b17ae (patch)
tree073d2a1f4305efdcfb0658f7310f4433aae5744f /include
parentb85af8d9fd31bc20c9f506350f22fda54fb3dbc7 (diff)
downloadgdb-08b0f198b16af719c329581e0ddc290c4c9b17ae.zip
gdb-08b0f198b16af719c329581e0ddc290c4c9b17ae.tar.gz
gdb-08b0f198b16af719c329581e0ddc290c4c9b17ae.tar.bz2
Add new ELF section and segment types to readelf.
Diffstat (limited to 'include')
-rw-r--r--include/elf/aarch64.h10
-rw-r--r--include/elf/alpha.h4
-rw-r--r--include/elf/arm.h11
-rw-r--r--include/elf/common.h89
-rw-r--r--include/elf/csky.h2
-rw-r--r--include/elf/hppa.h14
-rw-r--r--include/elf/mips.h87
-rw-r--r--include/elf/msp430.h2
-rw-r--r--include/elf/riscv.h2
-rw-r--r--include/elf/x86-64.h2
10 files changed, 134 insertions, 89 deletions
diff --git a/include/elf/aarch64.h b/include/elf/aarch64.h
index fe92a83..cd0f77d 100644
--- a/include/elf/aarch64.h
+++ b/include/elf/aarch64.h
@@ -31,7 +31,15 @@
#define PT_AARCH64_MEMTAG_MTE (PT_LOPROC + 0x2)
/* Additional section types. */
-#define SHT_AARCH64_ATTRIBUTES 0x70000003 /* Section holds attributes. */
+/* Section holds attributes. */
+#define SHT_AARCH64_ATTRIBUTES (SHT_LOPROC + 3)
+/* Special aarch64-specific section for MTE support, as described in:
+ https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#section-types */
+#define SHT_AARCH64_AUTH_RELR (SHT_LOPROC + 4)
+/* Special aarch64-specific sections for MTE support, as described in:
+ https://github.com/ARM-software/abi-aa/blob/main/memtagabielf64/memtagabielf64.rst#7section-types */
+#define SHT_AARCH64_MEMTAG_GLOBALS_STATIC (SHT_LOPROC + 7)
+#define SHT_AARCH64_MEMTAG_GLOBALS_DYNAMIC (SHT_LOPROC + 8)
/* AArch64-specific values for sh_flags. */
#define SHF_ENTRYSECT 0x10000000 /* Section contains an
diff --git a/include/elf/alpha.h b/include/elf/alpha.h
index 02618c0..a65bf9c 100644
--- a/include/elf/alpha.h
+++ b/include/elf/alpha.h
@@ -42,10 +42,10 @@
/* Section contains some sort of debugging information. The exact
format is unspecified. It's probably ECOFF symbols. */
-#define SHT_ALPHA_DEBUG 0x70000001
+#define SHT_ALPHA_DEBUG (SHT_LOPROC + 1)
/* Section contains register usage information. */
-#define SHT_ALPHA_REGINFO 0x70000002
+#define SHT_ALPHA_REGINFO (SHT_LOPROC + 2)
/* A section of type SHT_MIPS_REGINFO contains the following
structure. */
diff --git a/include/elf/arm.h b/include/elf/arm.h
index 01708ef..6d96d6b 100644
--- a/include/elf/arm.h
+++ b/include/elf/arm.h
@@ -37,6 +37,7 @@
#define EF_ARM_VFP_FLOAT 0x400
/* Removed, was EF_ARM_MAVERICK_FLOAT 0x800 */
+#define PT_ARM_ARCHEXT (PT_LOPROC + 0)
/* Frame unwind information */
#define PT_ARM_EXIDX (PT_LOPROC + 1)
@@ -76,11 +77,11 @@
#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
/* Additional section types. */
-#define SHT_ARM_EXIDX 0x70000001 /* Section holds ARM unwind info. */
-#define SHT_ARM_PREEMPTMAP 0x70000002 /* Section pre-emption details. */
-#define SHT_ARM_ATTRIBUTES 0x70000003 /* Section holds attributes. */
-#define SHT_ARM_DEBUGOVERLAY 0x70000004 /* Section holds overlay debug info. */
-#define SHT_ARM_OVERLAYSECTION 0x70000005 /* Section holds GDB and overlay integration info. */
+#define SHT_ARM_EXIDX (SHT_LOPROC + 1) /* Section holds ARM unwind info. */
+#define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) /* Section pre-emption details. */
+#define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) /* Section holds attributes. */
+#define SHT_ARM_DEBUGOVERLAY (SHT_LOPROC + 4) /* Section holds overlay debug info. */
+#define SHT_ARM_OVERLAYSECTION (SHT_LOPROC + 5) /* Section holds GDB and overlay integration info. */
/* ARM-specific values for sh_flags. */
#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point. */
diff --git a/include/elf/common.h b/include/elf/common.h
index 7e62c34..78c85bd 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -76,20 +76,20 @@
#define ELFOSABI_CLOUDABI 17 /* Nuxi CloudABI */
#define ELFOSABI_OPENVOS 18 /* Stratus Technologies OpenVOS */
-#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_CUDA 51 /* NVIDIA CUDA architecture. */
+#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 ELFOSABI_ARM 97 /* ARM */
+#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
#define EI_ABIVERSION 8 /* ABI version */
#define EI_PAD 9 /* Start of padding bytes */
-
/* Values for e_type, which identifies the object file type. */
#define ET_NONE 0 /* No file type */
@@ -479,11 +479,12 @@
#define PT_SHLIB 5 /* Reserved, unspecified semantics */
#define PT_PHDR 6 /* Entry for header table itself */
#define PT_TLS 7 /* Thread local storage segment */
+#define PT_NUM 8 /* Number of defined types. */
+
#define PT_LOOS 0x60000000 /* OS-specific */
#define PT_HIOS 0x6fffffff /* OS-specific */
-#define PT_LOPROC 0x70000000 /* Processor-specific */
-#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
+#define PT_SUNW_UNWIND (PT_LOOS + 0x464e550)
#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550) /* Frame unwind information */
#define PT_SUNW_EH_FRAME PT_GNU_EH_FRAME /* Solaris uses the same value */
#define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */
@@ -499,11 +500,20 @@
#define PT_OPENBSD_SYSCALLS (PT_LOOS + 0x5a3dbe9) /* System call sites. */
#define PT_OPENBSD_BOOTDATA (PT_LOOS + 0x5a41be6) /* Section for boot arguments. */
+/* Solaris segment types. */
+#define PT_SUNWBSS (PT_LOOS + 0xffffffa) /* Sun Specific segment. */
+#define PT_SUNWSTACK (PT_LOOS + 0xffffffb) /* Stack segment. */
+#define PT_SUNWDTRACE (PT_LOOS + 0xffffffc)
+#define PT_SUNWCAP (PT_LOOS + 0xffffffd)
+
/* Mbind segments */
#define PT_GNU_MBIND_NUM 4096
#define PT_GNU_MBIND_LO (PT_LOOS + 0x474e555)
#define PT_GNU_MBIND_HI (PT_GNU_MBIND_LO + PT_GNU_MBIND_NUM - 1)
+#define PT_LOPROC 0x70000000 /* Processor-specific */
+#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
+
/* Program segment permissions, in program header p_flags field. */
#define PF_X (1 << 0) /* Segment is executable */
@@ -538,17 +548,40 @@
#define SHT_LOOS 0x60000000 /* First of OS specific semantics */
#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */
-#define SHT_GNU_INCREMENTAL_INPUTS 0x6fff4700 /* incremental build data */
-#define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes */
-#define SHT_GNU_HASH 0x6ffffff6 /* GNU style symbol hash table */
-#define SHT_GNU_LIBLIST 0x6ffffff7 /* List of prelink dependencies */
-
+#define SHT_ANDROID_REL 0x60000001
+#define SHT_ANDROID_RELA 0x60000002
+
+#define SHT_GNU_INCREMENTAL_INPUTS 0x6fff4700 /* Incremental build data */
+
+#define SHT_LLVM_ODRTAB 0x6fff4c00 /* LLVM ODR table. */
+#define SHT_LLVM_LINKER_OPTIONS 0x6fff4c01 /* LLVM Linker Options. */
+#define SHT_LLVM_ADDRSIG 0x6fff4c03 /* List of address-significant symbols for safe ICF. */
+#define SHT_LLVM_DEPENDENT_LIBRARIES 0x6fff4c04 /* LLVM Dependent Library Specifiers. */
+#define SHT_LLVM_SYMPART 0x6fff4c05 /* Symbol partition specification. */
+#define SHT_LLVM_PART_EHDR 0x6fff4c06 /* ELF header for loadable partition. */
+#define SHT_LLVM_PART_PHDR 0x6fff4c07 /* Phdrs for loadable partition. */
+#define SHT_LLVM_BB_ADDR_MAP_V0 0x6fff4c08 /* LLVM Basic Block Address Map. */
+#define SHT_LLVM_CALL_GRAPH_PROFILE 0x6fff4c09 /* LLVM Call Graph Profile. */
+#define SHT_LLVM_BB_ADDR_MAP 0x6fff4c0a /* LLVM Basic Block Address Map. */
+#define SHT_LLVM_OFFLOADING 0x6fff4c0b /* LLVM device offloading data. */
+#define SHT_LLVM_LTO 0x6fff4c0c /* .llvm.lto for fat LTO. */
+
+#define SHT_ANDROID_RELR 0x6fffff00
+
+#define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes */
+#define SHT_GNU_HASH 0x6ffffff6 /* GNU style symbol hash table */
+#define SHT_GNU_LIBLIST 0x6ffffff7 /* List of prelink dependencies */
+#define SHT_CHECKSUM 0x6ffffff8 /* Checksum for DSO content. */
+
+#define SHT_SUNW_move 0x6ffffffa
+#define SHT_SUNW_COMDAT 0x6ffffffb
+#define SHT_SUNW_syminfo 0x6ffffffc
/* The next three section types are defined by Solaris, and are named
SHT_SUNW*. We use them in GNU code, so we also define SHT_GNU*
versions. */
-#define SHT_SUNW_verdef 0x6ffffffd /* Versions defined by file */
-#define SHT_SUNW_verneed 0x6ffffffe /* Versions needed by file */
-#define SHT_SUNW_versym 0x6fffffff /* Symbol versions */
+#define SHT_SUNW_verdef 0x6ffffffd /* Versions defined by file */
+#define SHT_SUNW_verneed 0x6ffffffe /* Versions needed by file */
+#define SHT_SUNW_versym 0x6fffffff /* Symbol versions */
#define SHT_GNU_verdef SHT_SUNW_verdef
#define SHT_GNU_verneed SHT_SUNW_verneed
@@ -556,6 +589,7 @@
#define SHT_LOPROC 0x70000000 /* Processor-specific semantics, lo */
#define SHT_HIPROC 0x7FFFFFFF /* Processor-specific semantics, hi */
+
#define SHT_LOUSER 0x80000000 /* Application-specific semantics */
/* #define SHT_HIUSER 0x8FFFFFFF *//* Application-specific semantics */
#define SHT_HIUSER 0xFFFFFFFF /* New value, defined in Oct 4, 1999 Draft */
@@ -576,19 +610,16 @@
/* #define SHF_MASKOS 0x0F000000 *//* OS-specific semantics */
#define SHF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */
-#define SHF_GNU_RETAIN (1 << 21) /* Section should not be garbage collected by the linker. */
-#define SHF_MASKPROC 0xF0000000 /* Processor-specific semantics */
+#define SHF_GNU_RETAIN (1 << 21) /* Section should not be garbage collected by the linker. */
+#define SHF_GNU_MBIND (1 << 24) /* Mbind section. */
+#define SHF_MASKPROC 0xF0000000 /* Processor-specific semantics */
/* This used to be implemented as a processor specific section flag.
- We just make it generic. */
-#define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude
- this section from executable
- and shared library that it
- builds when those objects
- are not to be further
- relocated. */
-
-#define SHF_GNU_MBIND 0x01000000 /* Mbind section. */
+ We just make it generic. The definition is: the link editor is
+ to exclude this section from executable and shared libraries that
+ it builds when those objects are not to be further relocated. */
+#define SHF_EXCLUDE (1U << 31)
+
/* Compression types. */
#define ELFCOMPRESS_ZLIB 1 /* Compressed with zlib. */
diff --git a/include/elf/csky.h b/include/elf/csky.h
index fcecbb1..c35a9ff 100644
--- a/include/elf/csky.h
+++ b/include/elf/csky.h
@@ -95,7 +95,7 @@ START_RELOC_NUMBERS (elf_csky_reloc_type)
END_RELOC_NUMBERS (R_CKCORE_MAX)
/* Additional section types. */
-#define SHT_CSKY_ATTRIBUTES 0x70000001 /* Section holds attributes. */
+#define SHT_CSKY_ATTRIBUTES (SHT_LOPROC + 1) /* Section holds attributes. */
/* Object attribute tags. */
enum
diff --git a/include/elf/hppa.h b/include/elf/hppa.h
index 0cafb99..fc90108 100644
--- a/include/elf/hppa.h
+++ b/include/elf/hppa.h
@@ -63,27 +63,27 @@
/* Processor specific section types. */
/* Section contains product specific extension bits. */
-#define SHT_PARISC_EXT 0x70000000
+#define SHT_PARISC_EXT (SHT_LOPROC + 0)
/* Section contains unwind table entries. */
-#define SHT_PARISC_UNWIND 0x70000001
+#define SHT_PARISC_UNWIND (SHT_LOPROC + 1)
/* Section contains debug information for optimized code. */
-#define SHT_PARISC_DOC 0x70000002
+#define SHT_PARISC_DOC (SHT_LOPROC + 2)
/* Section contains code annotations. */
-#define SHT_PARISC_ANNOT 0x70000003
+#define SHT_PARISC_ANNOT (SHT_LOPROC + 3)
/* DLKM special section. */
-#define SHT_PARISC_DLKM 0x70000004
+#define SHT_PARISC_DLKM (SHT_LOPROC + 4)
/* These are strictly for compatibility with the older elf32-hppa
implementation. Hopefully we can eliminate them in the future. */
/* Optional section holding argument location/relocation info. */
-#define SHT_PARISC_SYMEXTN SHT_LOPROC + 8
+#define SHT_PARISC_SYMEXTN (SHT_LOPROC + 8)
/* Option section for linker stubs. */
-#define SHT_PARISC_STUBS SHT_LOPROC + 9
+#define SHT_PARISC_STUBS (SHT_LOPROC + 9)
/* Processor specific section flags. */
diff --git a/include/elf/mips.h b/include/elf/mips.h
index 686d550..fb33576 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -373,131 +373,136 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
/* Section contains the set of dynamic shared objects used when
statically linking. */
-#define SHT_MIPS_LIBLIST 0x70000000
+#define SHT_MIPS_LIBLIST (SHT_LOPROC + 0)
/* I'm not sure what this is, but it's used on Irix 5. */
-#define SHT_MIPS_MSYM 0x70000001
+#define SHT_MIPS_MSYM (SHT_LOPROC + 1)
/* Section contains list of symbols whose definitions conflict with
symbols defined in shared objects. */
-#define SHT_MIPS_CONFLICT 0x70000002
+#define SHT_MIPS_CONFLICT (SHT_LOPROC + 2)
/* Section contains the global pointer table. */
-#define SHT_MIPS_GPTAB 0x70000003
+#define SHT_MIPS_GPTAB (SHT_LOPROC + 3)
/* Section contains microcode information. The exact format is
unspecified. */
-#define SHT_MIPS_UCODE 0x70000004
+#define SHT_MIPS_UCODE (SHT_LOPROC + 4)
/* Section contains some sort of debugging information. The exact
format is unspecified. It's probably ECOFF symbols. */
-#define SHT_MIPS_DEBUG 0x70000005
+#define SHT_MIPS_DEBUG (SHT_LOPROC + 5)
/* Section contains register usage information. */
-#define SHT_MIPS_REGINFO 0x70000006
+#define SHT_MIPS_REGINFO (SHT_LOPROC + 6)
/* ??? */
-#define SHT_MIPS_PACKAGE 0x70000007
+#define SHT_MIPS_PACKAGE (SHT_LOPROC + 7)
/* ??? */
-#define SHT_MIPS_PACKSYM 0x70000008
+#define SHT_MIPS_PACKSYM (SHT_LOPROC + 8)
/* ??? */
-#define SHT_MIPS_RELD 0x70000009
+#define SHT_MIPS_RELD (SHT_LOPROC + 9)
+/* Note: SHT_LOPROC + 0xa is missing... */
+
/* Section contains interface information. */
-#define SHT_MIPS_IFACE 0x7000000b
+#define SHT_MIPS_IFACE (SHT_LOPROC + 0xb)
/* Section contains description of contents of another section. */
-#define SHT_MIPS_CONTENT 0x7000000c
+#define SHT_MIPS_CONTENT (SHT_LOPROC + 0xc)
/* Section contains miscellaneous options. */
-#define SHT_MIPS_OPTIONS 0x7000000d
+#define SHT_MIPS_OPTIONS (SHT_LOPROC + 0xd)
+
+/* Note: SHT_LOPROC + 0xe is missing... */
+/* Note: SHT_LOPROC + 0xf is missing... */
/* ??? */
-#define SHT_MIPS_SHDR 0x70000010
+#define SHT_MIPS_SHDR (SHT_LOPROC + 0x10)
/* ??? */
-#define SHT_MIPS_FDESC 0x70000011
+#define SHT_MIPS_FDESC (SHT_LOPROC + 0x11)
/* ??? */
-#define SHT_MIPS_EXTSYM 0x70000012
+#define SHT_MIPS_EXTSYM (SHT_LOPROC + 0x12)
/* ??? */
-#define SHT_MIPS_DENSE 0x70000013
+#define SHT_MIPS_DENSE (SHT_LOPROC + 0x13)
/* ??? */
-#define SHT_MIPS_PDESC 0x70000014
+#define SHT_MIPS_PDESC (SHT_LOPROC + 0x14)
/* ??? */
-#define SHT_MIPS_LOCSYM 0x70000015
+#define SHT_MIPS_LOCSYM (SHT_LOPROC + 0x15)
/* ??? */
-#define SHT_MIPS_AUXSYM 0x70000016
+#define SHT_MIPS_AUXSYM (SHT_LOPROC + 0x16)
/* ??? */
-#define SHT_MIPS_OPTSYM 0x70000017
+#define SHT_MIPS_OPTSYM (SHT_LOPROC + 0x17)
/* ??? */
-#define SHT_MIPS_LOCSTR 0x70000018
+#define SHT_MIPS_LOCSTR (SHT_LOPROC + 0x18)
/* ??? */
-#define SHT_MIPS_LINE 0x70000019
+#define SHT_MIPS_LINE (SHT_LOPROC + 0x19)
/* ??? */
-#define SHT_MIPS_RFDESC 0x7000001a
+#define SHT_MIPS_RFDESC (SHT_LOPROC + 0x1a)
/* Delta C++: symbol table */
-#define SHT_MIPS_DELTASYM 0x7000001b
+#define SHT_MIPS_DELTASYM (SHT_LOPROC + 0x1b)
/* Delta C++: instance table */
-#define SHT_MIPS_DELTAINST 0x7000001c
+#define SHT_MIPS_DELTAINST (SHT_LOPROC + 0x1c)
/* Delta C++: class table */
-#define SHT_MIPS_DELTACLASS 0x7000001d
+#define SHT_MIPS_DELTACLASS (SHT_LOPROC + 0x1d)
/* DWARF debugging section. */
-#define SHT_MIPS_DWARF 0x7000001e
+#define SHT_MIPS_DWARF (SHT_LOPROC + 0x1e)
/* Delta C++: declarations */
-#define SHT_MIPS_DELTADECL 0x7000001f
+#define SHT_MIPS_DELTADECL (SHT_LOPROC + 0x1f)
/* List of libraries the binary depends on. Includes a time stamp, version
number. */
-#define SHT_MIPS_SYMBOL_LIB 0x70000020
+#define SHT_MIPS_SYMBOL_LIB (SHT_LOPROC + 0x20)
/* Events section. */
-#define SHT_MIPS_EVENTS 0x70000021
+#define SHT_MIPS_EVENTS (SHT_LOPROC + 0x21)
/* ??? */
-#define SHT_MIPS_TRANSLATE 0x70000022
+#define SHT_MIPS_TRANSLATE (SHT_LOPROC + 0x22)
/* Special pixie sections */
-#define SHT_MIPS_PIXIE 0x70000023
+#define SHT_MIPS_PIXIE (SHT_LOPROC + 0x23)
/* Address translation table (for debug info) */
-#define SHT_MIPS_XLATE 0x70000024
+#define SHT_MIPS_XLATE (SHT_LOPROC + 0x24)
/* SGI internal address translation table (for debug info) */
-#define SHT_MIPS_XLATE_DEBUG 0x70000025
+#define SHT_MIPS_XLATE_DEBUG (SHT_LOPROC + 0x25)
/* Intermediate code */
-#define SHT_MIPS_WHIRL 0x70000026
+#define SHT_MIPS_WHIRL (SHT_LOPROC + 0x26)
/* C++ exception handling region info */
-#define SHT_MIPS_EH_REGION 0x70000027
+#define SHT_MIPS_EH_REGION (SHT_LOPROC + 0x27)
/* Obsolete address translation table (for debug info) */
-#define SHT_MIPS_XLATE_OLD 0x70000028
+#define SHT_MIPS_XLATE_OLD (SHT_LOPROC + 0x28)
/* Runtime procedure descriptor table exception information (ucode) ??? */
-#define SHT_MIPS_PDR_EXCEPTION 0x70000029
+#define SHT_MIPS_PDR_EXCEPTION (SHT_LOPROC + 0x29)
/* ABI related flags section. */
-#define SHT_MIPS_ABIFLAGS 0x7000002a
+#define SHT_MIPS_ABIFLAGS (SHT_LOPROC + 0x2a)
/* GNU style symbol hash table with xlat. */
-#define SHT_MIPS_XHASH 0x7000002b
+#define SHT_MIPS_XHASH (SHT_LOPROC + 0x2b)
/* A section of type SHT_MIPS_LIBLIST contains an array of the
following structure. The sh_link field is the section index of the
diff --git a/include/elf/msp430.h b/include/elf/msp430.h
index dfff0d5..3b085fd 100644
--- a/include/elf/msp430.h
+++ b/include/elf/msp430.h
@@ -50,7 +50,7 @@
#define E_MSP430_MACH_MSP430x47 47
#define E_MSP430_MACH_MSP430x54 54
-#define SHT_MSP430_ATTRIBUTES 0x70000003 /* Section holds ABI attributes. */
+#define SHT_MSP430_ATTRIBUTES (SHT_LOPROC + 3)/* Section holds ABI attributes. */
#define SHT_MSP430_SEC_FLAGS 0x7f000005 /* Holds TI compiler's section flags. */
#define SHT_MSP430_SYM_ALIASES 0x7f000006 /* Holds TI compiler's symbol aliases. */
diff --git a/include/elf/riscv.h b/include/elf/riscv.h
index c1e73f7..24903c0 100644
--- a/include/elf/riscv.h
+++ b/include/elf/riscv.h
@@ -141,7 +141,7 @@ END_RELOC_NUMBERS (R_RISCV_max)
#define EF_RISCV_TSO 0x0010
/* Additional section types. */
-#define SHT_RISCV_ATTRIBUTES 0x70000003 /* Section holds attributes. */
+#define SHT_RISCV_ATTRIBUTES (SHT_LOPROC + 3) /* Section holds attributes. */
/* Processor specific program header types. */
diff --git a/include/elf/x86-64.h b/include/elf/x86-64.h
index ea5036a..6b5ada8 100644
--- a/include/elf/x86-64.h
+++ b/include/elf/x86-64.h
@@ -118,7 +118,7 @@ END_RELOC_NUMBERS (R_X86_64_max)
/* Processor specific section types. */
-#define SHT_X86_64_UNWIND 0x70000001 /* unwind information */
+#define SHT_X86_64_UNWIND (SHT_LOPROC + 1) /* Unwind information. */
/* Like SHN_COMMON but the symbol will be allocated in the .lbss
section. */