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, 24 Feb 2022 17:56:46 +0000 (09:56 -0800)
commit30fbcb1460606a449cb18ac363a8f68f301671b0
tree71df1b3df901453fd3343c0f4b410a3d9d708831
parent6559f4607a38ea8abc03a80561a273005dd4d2a7
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