From: "H.J. Lu" <hjl.tools@gmail.com>
To: binutils@sourceware.org
Cc: gdb-patches@sourceware.org, Fangrui Song <maskray@google.com>
Subject: [gdb-11-branch: Patch 1/3] readelf: Support RELR in -S and -d and output
Date: Sun, 9 Jan 2022 09:45:02 -0800 [thread overview]
Message-ID: <20220109174504.1120244-2-hjl.tools@gmail.com> (raw)
In-Reply-To: <20220109174504.1120244-1-hjl.tools@gmail.com>
From: Fangrui Song <maskray@google.com>
readelf -r dumping support is not added in this patch.
include/
* elf/common.h: Add SHT_RELR, DT_RELR{,SZ,ENT}
bfd/
* elf.c (_bfd_elf_print_private_bfd_data): Add DT_RELR{,SZ,ENT}.
(cherry picked from commit dd207c1302d28d2d2b33cff058bb3fbf5138b480)
---
bfd/elf.c | 3 +++
include/elf/common.h | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/bfd/elf.c b/bfd/elf.c
index 8f6531f23cf..3d9c5ff03cc 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1773,6 +1773,9 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg)
case DT_REL: name = "REL"; break;
case DT_RELSZ: name = "RELSZ"; break;
case DT_RELENT: name = "RELENT"; break;
+ case DT_RELR: name = "RELR"; break;
+ case DT_RELRSZ: name = "RELRSZ"; break;
+ case DT_RELRENT: name = "RELRENT"; break;
case DT_PLTREL: name = "PLTREL"; break;
case DT_DEBUG: name = "DEBUG"; break;
case DT_TEXTREL: name = "TEXTREL"; break;
diff --git a/include/elf/common.h b/include/elf/common.h
index 7eefef9c7c4..8c6a595fea4 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -523,6 +523,7 @@
#define SHT_PREINIT_ARRAY 16 /* Array of ptrs to pre-init funcs */
#define SHT_GROUP 17 /* Section contains a section group */
#define SHT_SYMTAB_SHNDX 18 /* Indices for SHN_XINDEX entries */
+#define SHT_RELR 19 /* RELR relative relocations */
#define SHT_LOOS 0x60000000 /* First of OS specific semantics */
#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */
@@ -1056,6 +1057,9 @@
#define DT_PREINIT_ARRAY 32
#define DT_PREINIT_ARRAYSZ 33
#define DT_SYMTAB_SHNDX 34
+#define DT_RELRSZ 35
+#define DT_RELR 36
+#define DT_RELRENT 37
/* Note, the Oct 4, 1999 draft of the ELF ABI changed the values
for DT_LOOS and DT_HIOS. Some implementations however, use
--
2.34.1
next prev parent reply other threads:[~2022-01-09 17:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-09 17:45 [gdb-11-branch: Patch 0/3] Support SHT_RELR (.relr.dyn) section H.J. Lu
2022-01-09 17:45 ` H.J. Lu [this message]
2022-01-09 17:45 ` [gdb-11-branch: Patch 2/3] readelf: Support SHT_RELR/DT_RELR for -r H.J. Lu
2022-01-09 17:45 ` [gdb-11-branch: Patch 3/3] bfd_section_from_shdr: Support SHT_RELR sections H.J. Lu
2022-01-10 2:44 ` [gdb-11-branch: Patch 0/3] Support SHT_RELR (.relr.dyn) section Simon Marchi
2022-01-10 13:03 ` H.J. Lu
2022-01-16 9:44 ` Joel Brobecker
2022-01-16 10:21 ` Joel Brobecker
2022-01-16 13:30 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220109174504.1120244-2-hjl.tools@gmail.com \
--to=hjl.tools@gmail.com \
--cc=binutils@sourceware.org \
--cc=gdb-patches@sourceware.org \
--cc=maskray@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).