[RFC] libdl: Make Elf_Sym::st_other available

Chris Johns chrisj at rtems.org
Wed Feb 28 23:27:31 UTC 2024


On 27/2/2024 6:46 pm, Sebastian Huber wrote:
> The 64-bit PowerPC ELFv2 relocation support needs access to the
> Elf_Sym::st_other symbol information.  The machine-specific relocation handler
> had only access to the Elf_Sym::st_info symbol information.  This change
> extends the 8-bit syminfo parameter to 16-bit and uses the additional
> 8-bits to provide Elf_Sym::st_other.  Another approach could be to pass
> a pointer to an Elf_Sym object instead of symname, syminfo, and
> symvalue.

I think symname and symvalue have to stay or the code needed to support them
moves out to all reloc handlers [1]. I agree there is a limit to the number args
to keep adding. If there is a need for more fields then it may pay to pass in
Elf_Sym* or rtems_rtl_obj_sym* which is the symbol table reference?

Chris

[1] https://git.rtems.org/rtems/tree/cpukit/libdl/rtl-elf.c#n429


More information about the devel mailing list