From 25cbdcbbc5d2d4ca834790b1d370fe5159b560de Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 4 Oct 2018 14:35:12 +0200 Subject: [PATCH] Handle R_RISCV_32_PCREL in readelf * readelf.c (is_32bit_pcrel_reloc): Handle R_RISCV_32_PCREL. --- binutils/ChangeLog | 4 ++++ binutils/readelf.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 35f71fcd7a0..6737c6794c5 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2018-10-08 Andreas Schwab + + * readelf.c (is_32bit_pcrel_reloc): Handle R_RISCV_32_PCREL. + 2018-10-03 Nick Clifton * po/pt.po: Updated Portuguese translation. diff --git a/binutils/readelf.c b/binutils/readelf.c index 91f4c122860..2748664a30c 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.30.2