[RFC] libdl: Make Elf_Sym::st_other available
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Mar 1 07:05:48 UTC 2024
On 29.02.24 00:27, Chris Johns wrote:
> 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
What do you prefer, a new st_other parameter, use Elf_Sym*, or use
rtems_rtl_obj_sym*?
The
/**
* An object file symbol.
*/
typedef struct rtems_rtl_obj_sym
{
rtems_chain_node node; /**< The node's link in the chain. */
const char* name; /**< The symbol's name. */
void* value; /**< The value of the symbol. */
uint32_t data; /**< Format specific data. */
} rtems_rtl_obj_sym;
has no st_info and st_other members. I tend to pass a Elf_Sym* pointer.
--
embedded brains GmbH & Co. KG
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
More information about the devel
mailing list