This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] Handle R_RISCV_32_PCREL in readelf
- From: Andreas Schwab <schwab at suse dot de>
- To: binutils at sourceware dot org
- Date: Thu, 04 Oct 2018 15:13:03 +0200
- Subject: [PATCH] Handle R_RISCV_32_PCREL in readelf
* readelf.c (is_32bit_pcrel_reloc): Handle R_RISCV_32_PCREL.
---
binutils/readelf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 91f4c12286..84697b0971 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -12538,6 +12538,8 @@ is_32bit_pcrel_reloc (Filedata * filedata, unsigned int reloc_type)
return reloc_type == 26; /* R_PPC_REL32. */
case EM_PPC64:
return reloc_type == 26; /* R_PPC64_REL32. */
+ case EM_RISCV:
+ return reloc_type == 57; /* R_RISCV_32_PCREL */
case EM_S390_OLD:
case EM_S390:
return reloc_type == 5; /* R_390_PC32. */
--
2.19.0
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."