readelf: Update "-D -r" to dump DT_RELR

1. Update dump_relr_relocations to take relr_size, relr_entsize and
relr_offset, instead of a pointer to Elf_Internal_Shdr, as function
arguments.
2. Update process_relocs to call dump_relr_relocations if relocation
type is reltype_relr.

binutils/

	PR binutils/33328
	* readelf.c (dump_relr_relocations): Replace a pointer to
	Elf_Internal_Shdr argument with relr_size, relr_entsize and
	relr_offset.
	(display_relocations): Update the dump_relr_relocations call.
	(process_relocs): Call dump_relr_relocations if relocation type
	is reltype_relr.

ld/

	PR binutils/33328
	* testsuite/ld-i386/dt-relr-1c.d: New file.
	* testsuite/ld-i386/dt-relr-1d.d: Likewise.
	* testsuite/ld-x86-64/dt-relr-1c-x32.d: Likewise.
	* testsuite/ld-x86-64/dt-relr-1c.d: Likewise.
	* testsuite/ld-x86-64/dt-relr-1d-x32.d: Likewise.
	* testsuite/ld-x86-64/dt-relr-1d.d: Likewise.
	* testsuite/ld-i386/i386.exp: Run PR binutils/33328 tests.
	* testsuite/ld-x86-64/x86-64.exp: Likewise.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
9 files changed