tools/nolibc/string: export memset() and memmove()
authorWilly Tarreau <w@1wt.eu>
Mon, 7 Feb 2022 16:23:47 +0000 (17:23 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 21 Apr 2022 00:05:45 +0000 (17:05 -0700)
commit8d304a3740232f018fca19d529cbc8d13afac755
tree46d1605d1ee407987d1ff525c2afefb4050fe4b1
parent023033fe343cdf2ba83ab762f8de69241c7fc086
tools/nolibc/string: export memset() and memmove()

"clang -Os" and "gcc -Ofast" without -ffreestanding may ignore memset()
and memmove(), hoping to provide their builtin equivalents, and finally
not find them. Thus we must export these functions for these rare cases.
Note that as they're set in their own sections, they will be eliminated
by the linker if not used. In addition, they do not prevent gcc from
identifying them and replacing them with the shorter "rep movsb" or
"rep stosb" when relevant.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/string.h