From: Paul F. <pj...@wa...> - 2024-11-24 17:28:25
|
On 24-11-24 12:39, Mark Wielaard wrote: > Hi Paul, > Longer term I am wondering if we shouldn't just define these standard > str/mem library calls directly outselves by simply calling the > VG_(...) variant. We are building -freestanding. So can simply define > these function symbols ourselves. Then all code can just use the > standard library names for these str/mem functions. And the compiler > is free to optimize them when possible. Hi Mark We do already for several of them due to these kinds of optimizations. These are in m_main.c Solaris has memcpy FreeBSD has memcpy memmove and memset Darwin has __memcpy_chk __memset_chk __bzero bzero memcpy and memset Linux has memcpy memmove memset abort raise and a load of __aeabi stuff on arm. We could have the subset of non __ prefixed ones always defined for all platforms. A+ Paul |