summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-10-12 18:23:31 -0400
committerGitHub <noreply@github.com>2023-10-12 18:23:31 -0400
commit519c12da1566e03b87cd1066999ed673ade30608 (patch)
tree37dc652e92c35d19ef74a419c382ab9bee45ef78 /src/common
parentd74fd9e2fe1f629d49adfac34c7e4b250e70ccb3 (diff)
parent7b5d234558f20fc1fb1efe6b1f42982125f232bc (diff)
Merge pull request #11746 from liamwhite/relr
jit: add support for relr-type relocations
Diffstat (limited to 'src/common')
-rw-r--r--src/common/elf.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/elf.h b/src/common/elf.h
index 14a5e9597..0b728dc54 100644
--- a/src/common/elf.h
+++ b/src/common/elf.h
@@ -211,6 +211,11 @@ struct Elf64_Rela {
Elf64_Sxword r_addend; /* Addend */
};
+/* RELR relocation table entry */
+
+using Elf32_Relr = Elf32_Word;
+using Elf64_Relr = Elf64_Xword;
+
/* How to extract and insert information held in the r_info field. */
static inline u32 Elf32RelSymIndex(Elf32_Word r_info) {
@@ -328,6 +333,9 @@ constexpr u32 ElfDtFiniArray = 26; /* Array with addresses of fini fct */
constexpr u32 ElfDtInitArraySz = 27; /* Size in bytes of DT_INIT_ARRAY */
constexpr u32 ElfDtFiniArraySz = 28; /* Size in bytes of DT_FINI_ARRAY */
constexpr u32 ElfDtSymtabShndx = 34; /* Address of SYMTAB_SHNDX section */
+constexpr u32 ElfDtRelrsz = 35; /* Size of RELR relative relocations */
+constexpr u32 ElfDtRelr = 36; /* Address of RELR relative relocations */
+constexpr u32 ElfDtRelrent = 37; /* Size of one RELR relative relocation */
} // namespace ELF
} // namespace Common