RISC-V: define elf_backend_dtrel_excludes_plt

The RISC-V port never defined elf_backend_dtrel_excludes_plt, unlike
x86-64, AArch64, arm, ppc, mips and s390.  As a result DT_RELASZ counted
.rela.dyn + .rela.plt instead of just .rela.dyn.

With an empty .rela.dyn this makes DT_RELA alias DT_JMPREL (DT_RELA ==
DT_JMPREL, DT_RELASZ == DT_PLTRELSZ).  glibc accepts the aliased range,
but tools that read the two ranges independently, such as llvm-bolt, then
process .rela.plt twice.

Define the macro so DT_RELASZ excludes .rela.plt, matching every other
target.  When .rela.dyn is empty DT_RELA is now zeroed and the aliasing
is gone.

	* elfnn-riscv.c (elf_backend_dtrel_excludes_plt): Define.

Signed-off-by: wangjue.wangjue <wangjue.wangjue@alibaba-inc.com>
1 file changed