From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1039) id B0D473858C83; Tue, 26 Apr 2022 17:18:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B0D473858C83 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: H.J. Lu To: glibc-cvs@sourceware.org Subject: [glibc] elf: Define DT_RELR related macros and types X-Act-Checkin: glibc X-Git-Author: H.J. Lu X-Git-Refname: refs/heads/master X-Git-Oldrev: 098a657fe449a217cf65c5270d5fbc8d40b5b4e6 X-Git-Newrev: 4610b24f5e4e6d2c4b769594efa6d460943163bb Message-Id: <20220426171821.B0D473858C83@sourceware.org> Date: Tue, 26 Apr 2022 17:18:21 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2022 17:18:21 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4610b24f5e4e6d2c4b769594efa6d460943163bb commit 4610b24f5e4e6d2c4b769594efa6d460943163bb Author: H.J. Lu Date: Tue Mar 29 14:08:54 2022 -0700 elf: Define DT_RELR related macros and types Diff: --- elf/elf.h | 13 +++++++++++-- scripts/glibcelf.py | 4 ++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/elf/elf.h b/elf/elf.h index 0735f6b579..0195029188 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -443,7 +443,8 @@ typedef struct #define SHT_PREINIT_ARRAY 16 /* Array of pre-constructors */ #define SHT_GROUP 17 /* Section group */ #define SHT_SYMTAB_SHNDX 18 /* Extended section indices */ -#define SHT_NUM 19 /* Number of defined types. */ +#define SHT_RELR 19 /* RELR relative relocations */ +#define SHT_NUM 20 /* Number of defined types. */ #define SHT_LOOS 0x60000000 /* Start OS-specific. */ #define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes. */ #define SHT_GNU_HASH 0x6ffffff6 /* GNU-style hash table. */ @@ -662,6 +663,11 @@ typedef struct Elf64_Sxword r_addend; /* Addend */ } Elf64_Rela; +/* RELR relocation table entry */ + +typedef Elf32_Word Elf32_Relr; +typedef Elf64_Xword Elf64_Relr; + /* How to extract and insert information held in the r_info field. */ #define ELF32_R_SYM(val) ((val) >> 8) @@ -887,7 +893,10 @@ typedef struct #define DT_PREINIT_ARRAY 32 /* Array with addresses of preinit fct*/ #define DT_PREINIT_ARRAYSZ 33 /* size in bytes of DT_PREINIT_ARRAY */ #define DT_SYMTAB_SHNDX 34 /* Address of SYMTAB_SHNDX section */ -#define DT_NUM 35 /* Number used */ +#define DT_RELRSZ 35 /* Total size of RELR relative relocations */ +#define DT_RELR 36 /* Address of RELR relative relocations */ +#define DT_RELRENT 37 /* Size of one RELR relative relocaction */ +#define DT_NUM 38 /* Number used */ #define DT_LOOS 0x6000000d /* Start of OS-specific */ #define DT_HIOS 0x6ffff000 /* End of OS-specific */ #define DT_LOPROC 0x70000000 /* Start of processor-specific */ diff --git a/scripts/glibcelf.py b/scripts/glibcelf.py index da0d5380f3..f847b36c55 100644 --- a/scripts/glibcelf.py +++ b/scripts/glibcelf.py @@ -304,6 +304,7 @@ class Sht(_OpenIntEnum): SHT_PREINIT_ARRAY = 16 SHT_GROUP = 17 SHT_SYMTAB_SHNDX = 18 + SHT_RELR = 19 SHT_GNU_ATTRIBUTES = 0x6ffffff5 SHT_GNU_HASH = 0x6ffffff6 SHT_GNU_LIBLIST = 0x6ffffff7 @@ -593,6 +594,9 @@ class Dt(_OpenIntEnum): DT_PREINIT_ARRAY = 32 DT_PREINIT_ARRAYSZ = 33 DT_SYMTAB_SHNDX = 34 + DT_RELRSZ = 35 + DT_RELR = 36 + DT_RELRENT = 37 DT_GNU_PRELINKED = 0x6ffffdf5 DT_GNU_CONFLICTSZ = 0x6ffffdf6 DT_GNU_LIBLISTSZ = 0x6ffffdf7