[PATCH 1/2] riscv: Add support for GNU indirect function

Vincent Chen vincent.chen@sifive.com
Fri Dec 4 03:35:57 GMT 2020


On Tue, Dec 1, 2020 at 9:14 PM Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
>
> The 12/01/2020 18:22, Vincent Chen wrote:
> > +elf_ifunc_invoke (ElfW(Addr) addr)
> > +{
> > +  return ((ElfW(Addr) (*) (uint64_t)) (addr)) (GLRO(dl_hwcap));
>
> based on the aarch64 experience i'd pass at
> least a (void*)0 second arg so once the
> hwcap bits are used up the ifunc call abi
> can be extended. (note that there is no
> other way to pass data to an ifunc resolver
> than the arguments: calling extern function
> or object symbols don't work.)

I think this is a good suggestion to reserve the room for future
extension. I will try to implement it in my next version patch. Thank
you very much.


More information about the Libc-alpha mailing list