aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2021-11-04 01:30:12 -0700
committerH.J. Lu <hjl.tools@gmail.com>2022-01-10 05:05:22 -0800
commit1b244ed9d3f4dc3df364bcd65332985ab03de302 (patch)
tree4eeb0edcea53433654c001edc8ab097ab4ce9971
parent6473a198286e51ceb8603618fa84a9b7ebaa3cfb (diff)
downloadgdb-1b244ed9d3f4dc3df364bcd65332985ab03de302.zip
gdb-1b244ed9d3f4dc3df364bcd65332985ab03de302.tar.gz
gdb-1b244ed9d3f4dc3df364bcd65332985ab03de302.tar.bz2
readelf: Support RELR in -S and -d and output
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)
-rw-r--r--bfd/elf.c3
-rw-r--r--include/elf/common.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 8f6531f..3d9c5ff 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 7eefef9..8c6a595 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