[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add types and values relative to RELR relocations
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH] Add types and values relative to RELR relocations |
Date: |
Thu, 17 Aug 2023 10:50:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
I just committed the patch on your behalf.
Thank you!
> ---
> elf-32.pk | 4 ++++
> elf-64.pk | 4 ++++
> elf-common.pk | 22 +++++++++++++++++++---
> 3 files changed, 27 insertions(+), 3 deletions(-)
>
> 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..7c7eab7 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_DT_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_DT_RELR = 36U,
> + /* d_val holds the size, in bytes, of the ELF_DT_RELR relocation
> + entry. */
> + ELF_DT_RELRENT = 37U,
> ELF_DT_LOOS = 0x6000_000dU,
> ELF_DT_HIOS = 0x6fff_f000U,
> ELF_DT_LOPROC = 0x7000_0000U,
> @@ -1107,7 +1117,10 @@ elf_config.add_enum
> Elf_Config_UInt { value = ELF_DT_FLAGS, name = "flags" },
> Elf_Config_UInt { value = ELF_DT_PREINIT_ARRAY, name =
> "preinit-array" },
> Elf_Config_UInt { value = ELF_DT_PREINIT_ARRAYSZ, name =
> "preinit-arraysz" },
> - Elf_Config_UInt { value = ELF_DT_SYMTAB_SHNDX, name =
> "symtab-shndx" }];
> + Elf_Config_UInt { value = ELF_DT_SYMTAB_SHNDX, name =
> "symtab-shndx" }
> + Elf_Config_UInt { value = ELF_DT_RELRSZ, name = "relrsz" },
> + Elf_Config_UInt { value = ELF_DT_RELR, name = "relr" },
> + Elf_Config_UInt { value = ELF_DT_RELRENT, name = "relrent" }];
>
> /* Definitions related to section groups. */
>
> @@ -1158,6 +1171,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,
> @@ -1198,7 +1212,9 @@ elf_config.add_enum
> Elf_Config_UInt { value = ELF_SHT_GROUP, name = "group",
> doc = "Section contains a section group." },
> Elf_Config_UInt { value = ELF_SHT_SYMTAB_SHNDX, name =
> "symtab-shndx",
> - doc = "Indices for SHN_XINDEX entries." }];
> + doc = "Indices for SHN_XINDEX entries." },
> + Elf_Config_UInt { value = ELF_SHT_RELR, name = "relr",
> + doc = "Packed relative relocations." }];
>
> /* Section Attribute Flags. */