[PATCH v1 1/3] riscv: Add multiarch support for strcpy
Jeff Law
jlaw@ventanamicro.com
Fri Sep 19 02:30:36 GMT 2025
On 9/18/25 18:50, Yao Zihong wrote:
> This patch introduces the riscv multiarch/IFUNC support for strcpy on RISC-V
> without changing behavior.
>
> - Add sysdeps/riscv/multiarch/strcpy-generic.c to re-export the default
> string/strcpy.c as __strcpy_generic.
> - Add sysdeps/unix/sysv/linux/riscv/multiarch/strcpy.c that provides the
> IFUNC wrapper and currently resolves to the generic implementation.
> - Register strcpy and strcpy-generic in the multiarch Makefile.
> - List the generic strcpy in ifunc-impl-list.c.
>
> Signed-off-by: Yao Zihong <zihong.plct@isrc.iscas.ac.cn>
> ---
> sysdeps/riscv/multiarch/strcpy-generic.c | 26 ++++++++++
> .../unix/sysv/linux/riscv/multiarch/Makefile | 2 +
> .../linux/riscv/multiarch/ifunc-impl-list.c | 4 +-
> .../unix/sysv/linux/riscv/multiarch/strcpy.c | 52 +++++++++++++++++++
> 4 files changed, 83 insertions(+), 1 deletion(-)
> create mode 100644 sysdeps/riscv/multiarch/strcpy-generic.c
> create mode 100644 sysdeps/unix/sysv/linux/riscv/multiarch/strcpy.c
This is functionally equivalent to what I was preparing to submit. I
don't know if I'm considered a glibc maintainer/reviewer anymore, but if
so, this is OK for the trunk by me. Though I would suggest waiting for
the entire set to be reviewed as I'll have questions about the vector
version :-)
jeff
More information about the Libc-alpha
mailing list