diff options
author | Hsiangkai Wang <kai.wang@sifive.com> | 2023-03-15 00:25:12 +0800 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2023-04-28 07:02:42 -0700 |
commit | 117e8b341c5c0ace8d65feeef136fececb3fdc9c (patch) | |
tree | 38aa30211c5aee3e6a1f15d3fec86bf18508608c /manual | |
parent | 2fa7fd1af733e323fa90d059e2ba60ec965d2cbb (diff) | |
download | glibc-117e8b341c5c0ace8d65feeef136fececb3fdc9c.tar.gz glibc-117e8b341c5c0ace8d65feeef136fececb3fdc9c.tar.xz glibc-117e8b341c5c0ace8d65feeef136fececb3fdc9c.zip |
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: Hsiangkai Wang <kai.wang@sifive.com> Signed-off-by: Vincent Chen <vincent.chen@sifive.com> Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com> Acked-by: Palmer Dabbelt <palmer@rivosinc.com> Link: https://inbox.sourceware.org/libc-alpha/20230314162512.35802-1-kito.cheng@sifive.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'manual')
-rw-r--r-- | manual/platform.texi | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/manual/platform.texi b/manual/platform.texi index c6ed73cb97..714c07813f 100644 --- a/manual/platform.texi +++ b/manual/platform.texi @@ -121,6 +121,12 @@ when it is not allowed, the priority is set to medium. @node RISC-V @appendixsec RISC-V-specific Facilities +Functions that are lazily bound must be compatible with the standard calling +convention. When a function is annotated with STO_RISCV_VARIANT_CC, it means +this function is not compatible with the standard calling convention. The +dynamic linker will directly resolve it instead of using the lazy binding +mechanism. + Cache management facilities specific to RISC-V systems that implement the Linux ABI are declared in @file{sys/cachectl.h}. |