[PATCH v3] RISC-V: Fix IFUNC resolver cannot access gp pointer
Kito Cheng
kito.cheng@sifive.com
Wed Jan 8 03:07:48 GMT 2025
Hi Yangyu:
> As for "running a piece of assemble code at the right time" I guess what
> you want is load_up [1]. I think that's technically correct, but how
> could we provide an ABI change to support this?
Florian has mentioned it could add a DT_ entry e.g. DT_RISCV_GP_VALUE
for that, and then use that to initialize the GP at the dynamic linker
side, I am happy to provide psABI support on this.
---
Hi Palmer:
> IIUC the conclusion here was to avoid global symbol resolution in IFUNCs
and instead use the pre-resolved function hwprobe VDSO function pointer
passed in via a register.
All symbols used in FMV features are hidden symbols, not global
symbols, so we didn't violate that rule on the FMV implementation.
And I think Yang-Yu's fix is technically right, however it may still
be worth improving to prevent some potential issues on adding some
bits on the psABI side, do you have practical concerns on this patch
itself? or you prefer not to touch this stuff and just going to fix on
the psABI side to add DT_RISCV_GP_VALUE?
More information about the Libc-alpha
mailing list