Re: [PATCH 2/5] readelf: Use BYTE_GET_SIZE in RELR relocation processing

Jan Beulich <[email protected]>
Newsgroups gmane.comp.gnu.binutils
Message-ID <[email protected]>
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 <[email protected]>

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.