[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Add types and values relative to RELR relocations
From: |
Mike Hommey |
Subject: |
[PATCH] Add types and values relative to RELR relocations |
Date: |
Thu, 17 Aug 2023 16:14:54 +0900 |
---
elf-32.pk | 4 ++++
elf-64.pk | 4 ++++
elf-common.pk | 13 ++++++++++++-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/elf-32.pk b/elf-32.pk
index 65420e7..ddf390f 100644
--- a/elf-32.pk
+++ b/elf-32.pk
@@ -61,6 +61,10 @@ type Elf32_Rela =
Elf_Sword r_addend;
};
+/* ELF32 RELR relocation entry. */
+
+type Elf32_Relr = Elf_Word;
+
/* ELF32 symbol. */
type Elf32_Sym =
diff --git a/elf-64.pk b/elf-64.pk
index fb35554..a708828 100644
--- a/elf-64.pk
+++ b/elf-64.pk
@@ -69,6 +69,10 @@ type Elf64_Rela =
Elf64_Sxword r_addend;
};
+/* ELF64 RELR relocation entry. */
+
+type Elf64_Relr = Elf64_Xword;
+
/* ELF64 symbol. */
type Elf64_Sym =
diff --git a/elf-common.pk b/elf-common.pk
index 7b1727d..6a1355a 100644
--- a/elf-common.pk
+++ b/elf-common.pk
@@ -997,7 +997,7 @@ var ELF_DT_NULL = 0U, /* Tags the end of the dynamic
array. */
dynamic linker's symbol resolution algorithm for references
within the library. */
ELF_DT_SYMBOLIC = 16U,
- /* d_ptr holds the address of a relocation table containing rela
+ /* d_ptr holds the address of a relocation table containing REL
relocations. If this element is present, the dynamic structure
must also have ELF_DT_RELSZ and ELF_DT_RELENT elements. */
ELF_DT_REL = 17U,
@@ -1066,6 +1066,16 @@ var ELF_DT_NULL = 0U, /* Tags the end of the dynamic
array. */
associated with the dynamic symbol table referenced by the
ELF_DT_SYMTAB element. */
ELF_DT_SYMTAB_SHNDX = 34U,
+ /* d_val holds the total size, in bytes, of the ELF_DT_RELR relocation
+ entry. */
+ ELF_DL_RELRSZ = 35U,
+ /* d_ptr holds the address of a relocation table containing RELR
+ relocations. If this element is present, the dynamic structure
+ must also have ELF_DT_RELRSZ and ELF_DT_RELRENT elements. */
+ ELF_DL_RELR = 36U,
+ /* d_val holds the size, in bytes, of the ELF_DT_RELR relocation
+ entry. */
+ ELF_DL_RELRENT = 37U,
ELF_DT_LOOS = 0x6000_000dU,
ELF_DT_HIOS = 0x6fff_f000U,
ELF_DT_LOPROC = 0x7000_0000U,
@@ -1158,6 +1168,7 @@ var ELF_SHT_NULL = 0U,
ELF_SHT_PREINIT_ARRAY = 16U,
ELF_SHT_GROUP = 17U,
ELF_SHT_SYMTAB_SHNDX = 18U,
+ ELF_SHT_RELR = 19U,
ELF_SHT_LOOS = 0x6000_0000U,
ELF_SHT_HIOS = 0x6fff_ffffU,
ELF_SHT_LOUSER = 0x8000_0000U,
--
2.41.0.3.g1cb8d410ac
- [PATCH] Add types and values relative to RELR relocations,
Mike Hommey <=