Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d7d72c5a-a929-7550-7cae-f648d95dfafa@mirbsd.de>
Date: Fri, 14 Nov 2025 00:15:21 +0100 (CET)
From: Thorsten Glaser <tg@...bsd.de>
To: musl@...ts.openwall.com
cc: pincheng.plct@...c.iscas.ac.cn
Subject: Re: [PATCH 1/1] riscv64: add optimized memset, memcpy and
 memmove

On Fri, 14 Nov 2025, Pincheng Wang wrote:

>+/* string function pointer, runtime-dispatched based on RVV support */
>+__attribute__((visibility("hidden")))
>+#ifndef __riscv_vector
>+void *(*__memset_ptr)(void *, int, size_t) = __memset_scalar;
>+void *(*__memcpy_ptr)(void *, const void *, size_t) = __memcpy_scalar;
>+void *(*__memmove_ptr)(void *, const void *, size_t) = __memmove_scalar;
>+#else
>+void *(*__memset_ptr)(void *, int, size_t) = __memset_vect;
>+void *(*__memcpy_ptr)(void *, const void *, size_t) = __memcpy_vect;
>+void *(*__memmove_ptr)(void *, const void *, size_t) = __memmove_vect;
>+#endif

You’d need to put the visibility attribute to each of these.

Why not just make them static (file-local), though?

Not speaking for musl,
//mirabilos
-- 
<igli> exceptions: a truly awful implementation of quite a nice idea.
<igli> just about the worst way you could do something like that, afaic.
<igli> it's like anti-design.  <mirabilos> that too… may I quote you on that?
<igli> sure, tho i doubt anyone will listen ;)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.