Skip to content
Unverified Commit 117e8b34 authored by Hsiangkai Wang's avatar Hsiangkai Wang Committed by Palmer Dabbelt
Browse files

riscv: Resolve symbols directly for symbols with STO_RISCV_VARIANT_CC.



In some cases, we do not want to go through the resolver for function
calls. For example, functions with vector arguments will use vector
registers to pass arguments. In the resolver, we do not save/restore the
vector argument registers for lazy binding efficiency. To avoid ruining
the vector arguments, functions with vector arguments will not go
through the resolver.

To achieve the goal, we will annotate the function symbols with
STO_RISCV_VARIANT_CC flag and add DT_RISCV_VARIANT_CC tag in the dynamic
section. In the first pass on PLT relocations, we do not set up to call
_dl_runtime_resolve. Instead, we resolve the functions directly.

Signed-off-by: default avatarHsiangkai Wang <kai.wang@sifive.com>
Signed-off-by: default avatarVincent Chen <vincent.chen@sifive.com>
Reviewed-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Acked-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Link: https://inbox.sourceware.org/libc-alpha/20230314162512.35802-1-kito.cheng@sifive.com


Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 2fa7fd1a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment