[PATCH 2/5] readelf: Use BYTE_GET_SIZE in RELR relocation processing
Jan Beulich
jbeulich@suse.com
Fri Jul 17 07:39:48 GMT 2026
On 09.07.2026 14:40, H.J. Lu wrote:
> Replace
>
> if (relr_entsize == sizeof (Elf32_External_Relr))
> entry = BYTE_GET (((Elf32_External_Relr *)relrs)[i].r_data);
> else
> entry = BYTE_GET (((Elf64_External_Relr *)relrs)[i].r_data);
>
> with
>
> BYTE_GET_SIZE (entry, relrs, relr_entsize);
>
> PR binutils/34356
> * readelf.c (count_relr_relocations): Change relrs_p to void **.
> Use BYTE_GET_SIZE.
> (dump_relr_relocations): Change relrs to void *. Use
> BYTE_GET_SIZE.
> (display_relocations): Change relrs to void *.
> (process_relocs): Likewise.
>
> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Other than for patch 1 (and by implication patches 3-5), this one looks
okay to me. Yet of course as presented it has a dependency on patch 1.
Jan
More information about the Binutils
mailing list