[PATCH] readelf: Don't change the symbol table
Jan Beulich
jbeulich@suse.com
Wed Sep 3 06:09:16 GMT 2025
On 02.09.2025 23:30, H.J. Lu wrote:
> 1. Update dump_relr_relocations not to change the symbol table.
I think it would nice to make such more explicit, by ...
> @@ -1880,13 +1879,13 @@ dump_relr_relocations (Filedata * filedata,
> uint64_t relr_size,
> int relr_entsize,
> uint64_t relr_offset,
> + uint64_t * relrs,
> Elf_Internal_Sym * symtab,
... making both of these pointer-to-const. That'll require some adjustment
further down afaict. (For relrs the freeing then may want leaving to the
caller when non-NULL was passed in, as casting away const-ness is awkward.)
As a nit: The * on the newly added line look misplaced, compared to the
other ones visible above as well as ...
> uint64_t nsyms,
> char * strtab,
... this one.
Jan
More information about the Binutils
mailing list