Hello, On Thu, Apr 20, 2023 at 11:38 PM Adhemerval Zanella Netto <adhemerval.zane...@linaro.org> wrote: > Can't you use a similar strategy done by > 5355f9ca7b10183ce06e8a18003ba30f43774858 ?
Do I understand it right that that is the moral equivalent of #define memcpy __memcpy_sse2_unaligned except that it works aat assembly level and so will catch implicit calls to memcpy that the compiler may insert? Assuming for a second that we don't care about implicit memcpys (but we should) and only about the explicit one made by the MIG runtime, we could maybe even just do void * __mig_memcpy (void *dst, const void *src, vm_size_t len) { - return memcpy (dst, src, len); + return __memcpy_sse2_unaligned (dst, src, len); } but that (as well as your proposal) would make *all* calls to memcpy in this place go through the baseline version, even after the early startup is done. Whereas my proposal attempted to avoid that -- unless of course H.J. is right and this prevents the indirect relocation from replacing the function pointer later, in which case it's even worse because it would sabotage memcpy for the whole program and not just a couple of files. Sergey